Svelte form - `state_proxy_equality_mismatch` warnings when calling `field.handleChange()`
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
Each call to field.handleChange() generates multiple state_proxy_equality_mismatch svelte warning in console.
Your minimal, reproducible example
Steps to reproduce
- Open the simple example for svelte form - https://codesandbox.io/p/devbox/github/tanstack/form/tree/main/examples/svelte/simple?embed=1&theme=dark&file=src/App.svelte
- Open devtools console
- Type anything into first name
- Each keystroke generates 7
state_proxy_equality_mismatchwarnings in console.
Reactive `$state(...)` proxies and the values they proxy have different identities. Because of this, comparisons with `===` will produce unexpected results
Expected behavior
I expect no warning to be in console.
How often does this bug happen?
Every time
Screenshots or Videos
Platform
- Chrome 150
- Rocky Linux
TanStack Form adapter
svelte-form
TanStack Form version
1.33.2
TypeScript version
No response
Additional context
The warning appears in version 1.33.0 and up. They do not appear in version 1.32.1 and lower.
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
Start with the Svelte simple example at examples/svelte/simple/src/App.svelte and reproduce the issue in the linked CodeSandbox by typing in the first-name field while watching the console. Compare behavior between versions 1.32.1 and 1.33.0; done means repeated field.handleChange() calls no longer produce state_proxy_equality_mismatch warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100