You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proxys are somehow ignored once they are inside a $state.
This occurs both on Proxies being directly $stated (as shown below) but also on proxies that are deeply nested somewhere inside an object (a more useful usecase :-))
That's because $state lazily copies the value. Instead, you should proxify the $state.
Talking about the second case, it's impossible to detect whether the object is proxied. So I see the only way - also $statify the value because currently stateful state isn't copied.
Describe the bug
Proxys are somehow ignored once they are inside a $state.
This occurs both on Proxies being directly $stated (as shown below) but also on proxies that are deeply nested somewhere inside an object (a more useful usecase :-))
Reproduction
Playground link: https://svelte.dev/playground/78baf2231a9647d09b52743fe53b8437?version=5.19.6.
Current behavior:
set entry two
Expected:
set entry two
set entry three
set entry X
appears in the console, with X the new content of the fieldLogs
System Info
System: OS: macOS 15.2 CPU: (10) arm64 Apple M1 Pro Memory: 102.95 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 23.6.1 - /opt/homebrew/bin/node npm: 10.9.2 - /opt/homebrew/bin/npm Browsers: Chrome: 132.0.6834.160 Safari: 18.2 npmPackages: svelte: ^5.7 => 5.19.6
Severity
annoyance
The text was updated successfully, but these errors were encountered: