-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
Describe the bug
It seems like a Proxy inside $state is somehow lost.
let state = $state(new Proxy({ foo: 42 }, {
set(target, prop, value) {
console.log(`Setting ${prop} to ${value}`);
target[prop] = value;
return true;
}
}));
state.foo++; // The Proxy set handler is not invokedReproduction
https://svelte.dev/playground/246e42e88fbb434c96e7e8b65667d6e6?version=5.39.11
As you can see, a Proxy inside $state does not work, while $state inside a Proxy works.
Logs
System Info
That of the latest Svelte PlaygroundSeverity
annoyance
Metadata
Metadata
Assignees
Labels
No labels