Devtools shows duplicate form entries in React Strict Mode after 0.2.11 upgrade
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 682
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 7
Description
Describe the bug
After upgrading @tanstack/react-form-devtools from 0.2.9 to 0.2.11, the devtools panel shows duplicate form entries (two identical "TANSTACK TanStack Form" headers) when React Strict Mode is enabled.
Your minimal, reproducible example
Any Next.js app with reactStrictMode: true in next.config.js and a form using TanStack Form.
Steps to reproduce
- Create a Next.js app with
reactStrictMode: true - Install
@tanstack/react-form-devtools@0.2.9- observe single form entry in devtools - Upgrade to
@tanstack/react-form-devtools@0.2.11- observe duplicate form entries
Expected behavior
Single form entry in devtools, same as in 0.2.9.
How often does this bug happen?
Every time (100% reproducible)
Screenshots
Two identical "TANSTACK TanStack Form" headers appear in the devtools panel.
Platform
- Next.js 15.x with React 19
reactStrictMode: true- macOS / Chrome
TanStack Form version
- Working:
@tanstack/react-form-devtools@0.2.9with@tanstack/devtools-utils@0.0.9 - Broken:
@tanstack/react-form-devtools@0.2.11with@tanstack/devtools-utils@0.2.3
Analysis
The issue appears to be related to the strict mode fix in #1978. React Strict Mode intentionally mounts components twice (mount → unmount → mount). The fix in 0.2.11 prevents the error but seems to cause forms to be registered twice instead of being properly cleaned up on the first unmount.
The significant version jump in @tanstack/devtools-utils (0.0.9 → 0.2.3) is likely where the regression was introduced.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a Next.js app with reactStrictMode enabled using @tanstack/react-form-devtools@0.2.11 and compare it with 0.2.9. Inspect the registration and cleanup behavior introduced around #1978 and the @tanstack/devtools-utils upgrade; done means Strict Mode shows one form entry instead of duplicates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- devtools, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100