Skip to content

docs(vue-query): update suspense guide example to v5 object syntax - #11159

Open
hamed-bavar wants to merge 1 commit into
TanStack:mainfrom
hamed-bavar:docs/vue-suspense-v5-syntax
Open

docs(vue-query): update suspense guide example to v5 object syntax#11159
hamed-bavar wants to merge 1 commit into
TanStack:mainfrom
hamed-bavar:docs/vue-suspense-v5-syntax

Conversation

@hamed-bavar

@hamed-bavar hamed-bavar commented Aug 9, 2026

Copy link
Copy Markdown

The Vue suspense guide's second example still uses the v4 positional-arguments call:

const { data, suspense } = useQuery(['todos'], todoFetcher)

v5 accepts only a single options object, so copying this snippet into a v5 app produces an error. Updated it to the object form:

const { data, suspense } = useQuery({
  queryKey: ['todos'],
  queryFn: todoFetcher,
})

As far as I can tell this was the last v4-style positional call left in the docs outside the migration guides. Docs-only change, no behavior affected.

Summary by CodeRabbit

  • Documentation
    • Updated the Vue Query useQuery example to use the current object-based options syntax.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e61804e3-9b70-4769-8c1d-fa2cec71061a

📥 Commits

Reviewing files that changed from the base of the PR and between 46d7f02 and c120c20.

📒 Files selected for processing (1)
  • docs/framework/vue/guides/suspense.md

📝 Walkthrough

Walkthrough

The Vue Query suspense guide now shows useQuery with object-based options. The example provides queryKey and queryFn as named properties.

Changes

Vue Query documentation

Layer / File(s) Summary
Update suspense example
docs/framework/vue/guides/suspense.md
The useQuery example replaces positional arguments with an options object containing queryKey and queryFn.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the documentation update to Vue Query v5 object syntax.
Description check ✅ Passed The description explains the change, motivation, affected syntax, and documentation-only impact, but it omits the template headings and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant