Closed
Description
Describe the bug
I just wanted to give the new mutable deriveds a try and did a simple test:
let thing = $derived(state); // or just $derived('old')
thing = 'new';
However, in the output, I still see the old value, not the updated one.
Note: this works
let thing = $derived('old');
Promise.resolve().then(() => { thing = 'new' });
UPDATE: If you put a console.log
before the reassignment, then it starts working.
Reproduction
https://svelte.dev/playground/f447b4a9ec5d4271a9d1b187ab91a560?version=5.25.2
Logs
System Info
not relevant
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels