form icon indicating copy to clipboard operation
form copied to clipboard

feat(react-form): add `useTypedAppFormContext`

Open LeCarbonator opened this issue 1 month ago • 5 comments

🎯 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

LeCarbonator avatar Oct 26 '25 19:10 LeCarbonator

🦋 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

changeset-bot[bot] avatar Oct 26 '25 19:10 changeset-bot[bot]

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

nx-cloud[bot] avatar Oct 26 '25 19:10 nx-cloud[bot]

More templates

@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

pkg-pr-new[bot] avatar Oct 26 '25 19:10 pkg-pr-new[bot]

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.

codecov[bot] avatar Oct 26 '25 19:10 codecov[bot]

Just wondering when we can expect this to be released?

jmn-lime avatar Nov 24 '25 21:11 jmn-lime