fix: re-export useSelector and document useStore migration#2206
fix: re-export useSelector and document useStore migration#2206hemraj-007 wants to merge 2 commits into
Conversation
Re-export useSelector from TanStack Store adapters so consumers can import it from @tanstack/form packages instead of only the deprecated useStore alias. Updates docs, examples, and adds form.useSelector for Vue, Solid, and Svelte. Fixes TanStack#2203
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR introduces ChangesuseSelector Export and Implementation Across All Frameworks
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/framework/preact/guides/basic-concepts.md`:
- Line 239: The prose examples currently reference useSelector(form.store)
without a selector which contradicts the guidance; update both narrative
mentions (the one at the shown diff and the other at the occurrence around line
268) to include a selector argument (e.g., useSelector(form.store, selector) or
a brief inline example like useSelector(form.store, s => s.values)) so the
documentation consistently demonstrates using useSelector(form.store, …) instead
of the no-selector form; adjust the text around form.Subscribe and useSelector
to reflect the selector usage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 483e66b4-2bda-4b5a-9e54-62c71ddc3fe4
📒 Files selected for processing (55)
.changeset/use-selector-export.mddocs/framework/preact/guides/basic-concepts.mddocs/framework/preact/guides/form-composition.mddocs/framework/preact/guides/reactivity.mddocs/framework/preact/guides/validation.mddocs/framework/preact/reference/index.mddocs/framework/preact/reference/variables/useSelector.mddocs/framework/preact/reference/variables/useStore.mddocs/framework/react/guides/basic-concepts.mddocs/framework/react/guides/form-composition.mddocs/framework/react/guides/reactivity.mddocs/framework/react/guides/ssr.mddocs/framework/react/guides/validation.mddocs/framework/react/reference/index.mddocs/framework/react/reference/variables/useSelector.mddocs/framework/react/reference/variables/useStore.mddocs/framework/solid/guides/basic-concepts.mddocs/framework/solid/guides/form-composition.mddocs/framework/solid/guides/validation.mddocs/framework/svelte/guides/basic-concepts.mddocs/framework/svelte/guides/validation.mddocs/framework/vue/guides/basic-concepts.mddocs/framework/vue/guides/validation.mdexamples/react/large-form/src/components/text-fields.tsxexamples/react/multi-step-wizard/src/components/text-fields.tsxpackages/preact-form/CHANGELOG.mdpackages/preact-form/src/index.tspackages/preact-form/src/useField.tsxpackages/preact-form/src/useFieldGroup.tsxpackages/preact-form/src/useForm.tsxpackages/preact-form/src/useFormGroup.tsxpackages/react-form/CHANGELOG.mdpackages/react-form/src/index.tspackages/react-form/src/useField.tsxpackages/react-form/src/useFieldGroup.tsxpackages/react-form/src/useForm.tsxpackages/react-form/src/useFormGroup.tsxpackages/react-form/tests/exports.test.tspackages/solid-form/CHANGELOG.mdpackages/solid-form/src/createField.tsxpackages/solid-form/src/createFieldGroup.tsxpackages/solid-form/src/createForm.tsxpackages/solid-form/src/createFormGroup.tsxpackages/solid-form/src/index.tsxpackages/svelte-form/CHANGELOG.mdpackages/svelte-form/src/Field.sveltepackages/svelte-form/src/FormGroup.sveltepackages/svelte-form/src/Subscribe.sveltepackages/svelte-form/src/createForm.svelte.tspackages/svelte-form/src/index.tspackages/vue-form/CHANGELOG.mdpackages/vue-form/src/index.tspackages/vue-form/src/useField.tsxpackages/vue-form/src/useForm.tsxpackages/vue-form/src/useFormGroup.tsx
|
Updated prose to use useSelector(form.store, …) for consistency |
useSelectorfrom TanStack Store in react/preact/vue/solid/svelte form packagesuseStoreexport for backward compatibilityform.useSelectoron Vue, Solid, and Svelte (deprecateform.useStore)exports.test.tsfor react-formSummary by CodeRabbit
New Features
Deprecations
Documentation