-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
This code leads to ERR_SVELTE_TOO_MANY_UPDATES,
<script>
let x = $state({
count: 0
});
$effect(() => {
x.count = 1;
});
</script>
while this doesn't cause any error,
<script>
let x = $state({
count: 0
});
$effect(() => {
x = { count: 1 }
});
</script>
Looks like a reactivity bug.
Reproduction
Logs
No response
System Info
System:
OS: macOS 14.2
CPU: (12) arm64 Apple M2 Pro
Memory: 269.64 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.2.0 - /opt/homebrew/bin/node
Yarn: 1.22.21 - /opt/homebrew/bin/yarn
npm: 10.2.4 - /opt/homebrew/bin/npm
pnpm: 8.11.0 - ~/Library/pnpm/pnpm
bun: 1.0.3 - ~/.bun/bin/bun
Browsers:
Chrome: 119.0.6045.199
Chrome Canary: 121.0.6156.2
Safari: 17.2
Severity
blocking an upgrade
Metadata
Metadata
Assignees
Labels
No labels