feat(react-form): add `useTypedAppFormContext`
🎯 Changes
This PR adds the useTypedAppFormContext hook, which accepts a formOptions for typing, while using context to get the form instance instead.
This is a less type safe variant of withForm, which is why we will only recommend it in cases where passing as prop is not possible.
🚀 Release Impact
- [x] This change affects published code, and I have generated a changeset.
- [ ] This change is docs/CI/dev-only (no release).
Todos
- [ ] Finalize naming of the hook
- [ ] Add docs section to address its use cases
🦋 Changeset detected
Latest commit: d3b1481d760663e000970d3d1f8c44b5cef8b267
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @tanstack/react-form | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
View your CI Pipeline Execution ↗ for commit d3b1481d760663e000970d3d1f8c44b5cef8b267
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:sherif,test:knip,tes... |
✅ Succeeded | 1m 7s | View ↗ |
nx run-many --target=build --exclude=examples/** |
✅ Succeeded | 6s | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-10-26 19:49:12 UTC
More templates
- @tanstack/form-example-angular-array
- @tanstack/form-example-angular-large-form
- @tanstack/form-example-angular-simple
- @tanstack/form-example-angular-standard-schema
- @tanstack/form-example-lit-array
- @tanstack/form-example-lit-simple
- @tanstack/form-example-lit-standard-schema
- @tanstack/form-example-lit-ui-libraries
- @tanstack/form-example-react-array
- @tanstack/form-example-react-compiler
- @tanstack/form-example-react-devtools
- @tanstack/form-example-react-dynamic
- @tanstack/field-errors-from-form-validators
- @tanstack/form-example-react-large-form
- @tanstack/form-example-react-next-server-actions
- @tanstack/form-example-react-query-integration
- @tanstack/form-example-remix
- @tanstack/form-example-react-simple
- @tanstack/form-example-react-standard-schema
- @tanstack/form-example-react-tanstack-start
- @tanstack/form-example-react-ui-libraries
- @tanstack/form-example-solid-array
- @tanstack/form-example-solid-large-form
- @tanstack/form-example-solid-simple
- @tanstack/form-example-solid-standard-schema
- @tanstack/form-example-svelte-array
- @tanstack/form-example-svelte-simple
- @tanstack/form-example-svelte-standard-schema
- @tanstack/form-example-vue-array
- @tanstack/form-example-vue-simple
- @tanstack/form-example-vue-standard-schema
@tanstack/angular-form
npm i https://pkg.pr.new/@tanstack/angular-form@1826
@tanstack/form-core
npm i https://pkg.pr.new/@tanstack/form-core@1826
@tanstack/form-devtools
npm i https://pkg.pr.new/@tanstack/form-devtools@1826
@tanstack/lit-form
npm i https://pkg.pr.new/@tanstack/lit-form@1826
@tanstack/react-form
npm i https://pkg.pr.new/@tanstack/react-form@1826
@tanstack/react-form-devtools
npm i https://pkg.pr.new/@tanstack/react-form-devtools@1826
@tanstack/solid-form
npm i https://pkg.pr.new/@tanstack/solid-form@1826
@tanstack/svelte-form
npm i https://pkg.pr.new/@tanstack/svelte-form@1826
@tanstack/vue-form
npm i https://pkg.pr.new/@tanstack/vue-form@1826
commit: d3b1481
Codecov Report
:x: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 52.94%. Comparing base (6892ed0) to head (d3b1481).
:warning: Report is 62 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| packages/react-form/src/createFormHook.tsx | 87.50% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1826 +/- ##
===========================================
- Coverage 90.35% 52.94% -37.42%
===========================================
Files 38 14 -24
Lines 1752 187 -1565
Branches 444 29 -415
===========================================
- Hits 1583 99 -1484
+ Misses 149 77 -72
+ Partials 20 11 -9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Just wondering when we can expect this to be released?