fix(form-core): Fix memory leaks from EventClient
🎯 Changes
The PR addresses two memory leaks related to the EventClient:
- [x] Unsubscribe from event listeners on cleanup
- [ ] Fix
queuedEventsfrom piling upFormApireferences
🚀 Release Impact
- [x] This change affects published code, and I have generated a changeset.
- [ ] This change is docs/CI/dev-only (no release).
⚠️ No Changeset found
Latest commit: e7f81f1cd0ba3693de187cc8a57df9bd9fab3815
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
View your CI Pipeline Execution ↗ for commit e7f81f1cd0ba3693de187cc8a57df9bd9fab3815
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:sherif,test:knip,tes... |
✅ Succeeded | 1m 26s | View ↗ |
nx run-many --target=build --exclude=examples/** |
✅ Succeeded | 33s | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-12-11 10:16:50 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-devtools
- @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-large-form
- @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@1866
@tanstack/form-core
npm i https://pkg.pr.new/@tanstack/form-core@1866
@tanstack/form-devtools
npm i https://pkg.pr.new/@tanstack/form-devtools@1866
@tanstack/lit-form
npm i https://pkg.pr.new/@tanstack/lit-form@1866
@tanstack/react-form
npm i https://pkg.pr.new/@tanstack/react-form@1866
@tanstack/react-form-devtools
npm i https://pkg.pr.new/@tanstack/react-form-devtools@1866
@tanstack/react-form-nextjs
npm i https://pkg.pr.new/@tanstack/react-form-nextjs@1866
@tanstack/react-form-remix
npm i https://pkg.pr.new/@tanstack/react-form-remix@1866
@tanstack/react-form-start
npm i https://pkg.pr.new/@tanstack/react-form-start@1866
@tanstack/solid-form
npm i https://pkg.pr.new/@tanstack/solid-form@1866
@tanstack/solid-form-devtools
npm i https://pkg.pr.new/@tanstack/solid-form-devtools@1866
@tanstack/svelte-form
npm i https://pkg.pr.new/@tanstack/svelte-form@1866
@tanstack/vue-form
npm i https://pkg.pr.new/@tanstack/vue-form@1866
commit: e7f81f1
Codecov Report
:x: Patch coverage is 25.00000% with 15 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 89.40%. Comparing base (6892ed0) to head (e7f81f1).
:warning: Report is 94 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| packages/form-core/src/FormApi.ts | 25.00% | 12 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1866 +/- ##
==========================================
- Coverage 90.35% 89.40% -0.96%
==========================================
Files 38 48 +10
Lines 1752 1934 +182
Branches 444 479 +35
==========================================
+ Hits 1583 1729 +146
- Misses 149 184 +35
- Partials 20 21 +1
: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.
Related PR: https://github.com/TanStack/devtools/pull/272
Also experiencing this, I made the forms client only to temporarily mitigate the issue.