Skip to content

Svelte form - state_proxy_equality_mismatch warnings when calling field.handleChange() #2256

Description

@Bladesheng

Describe the bug

Each call to field.handleChange() generates multiple state_proxy_equality_mismatch svelte warning in console.

Your minimal, reproducible example

https://codesandbox.io/p/devbox/github/tanstack/form/tree/main/examples/svelte/simple?embed=1&theme=dark&file=src/App.svelte

Steps to reproduce

  1. 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
  2. Open devtools console
  3. Type anything into first name
  4. Each keystroke generates 7 state_proxy_equality_mismatch warnings 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

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions