Repository navigation
Docs: Fix QueryClient imports in TanStack React setup snippets - #36256
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughChangesReact Query documentation
Merge Risk: ⚪ Minimal · up to The React Query setup snippets now correctly provide QueryClient at runtime, preventing the documented TypeScript and runtime failures. The change is ready to merge. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Comment |
Hi @pbk95120, Thank you for correcting both TanStack React setup snippets. Runtime verification reproduced the defect on the base SHA: TypeScript reported TS1361, removed At head Final automated verdict: verified. Architecture and code-quality stages were skipped because this is a small documentation-only diff. A human maintainer still makes the merge decision. |
What I did
Fixed both TanStack React Query setup snippets to import
QueryClientas a runtime value. The snippets instantiatenew QueryClient(...), but the type-only import caused TS1361 and a runtime failure.AI assistance: Codex assisted with investigation and validation.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
No permanent test suite changes were needed. Both CSF 3 and CSF Next snippets pass TypeScript and runtime validation. Docs check, oxfmt, and
git diff --checkpass. The full repository test suite was not run because this is a two-line documentation fix.Manual testing
docs/_snippets/tanstack-react-query-setup.mdinto a TypeScript Storybook project.QueryClienterror.Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary Release - 🚫 Not run
This PR does not have a canary release associated.
In-repo PRs: add the
ci:canarylabel. Later pushes republish while the label remains.Fork PRs: the label does nothing (a later push must not auto-publish). A maintainer publishes from this repository with Run workflow and the
prinput.branchandshaare optional; if more than one is set, they must be the same commit. The fork author does not need to do anything.