Skip to content

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

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

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

Conversation

@harry-bavar

@harry-bavar harry-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.
    • Improved consistency with recommended usage patterns.

@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: 2c5a32dd-054e-44fd-9c87-63830abb5b83

📥 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 uses object-based options for the useQuery example. The example passes queryKey and queryFn in the options object.

Changes

Vue Query documentation

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

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Vue Query suspense guide and the update to v5 object syntax.
Description check ✅ Passed The description explains the change, motivation, documentation-only impact, and includes before-and-after examples; checklist confirmations are not provided.
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.

2 participants