-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
The following code results in TOO_MANY_UPDATES, as expected, but changing the order to s=v; f(s); does not.
const v = {value: 1};
let s = $state(v)
function f() {}
function change() {
f(s); s=v;
}
$effect(change);
Reproduction
Logs
When using `$effect(change_not_too_many_updates)`:
Rendered `{"value":1}`, no console message.
When using `$effect(change_too_many_updates)`:
Rendered `{"value":1}`, console message `Error: ERR_SVELTE_TOO_MANY_UPDATES`.System Info
svelte: ^5.0.0-next.1 => 5.0.0-next.8Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels