Closed
Description
Describe the bug
After upgrading to 5.16.1, I noticed that a derived value sometimes loses its reactivity in my project.
I couldn’t find the exact trigger though, I could find reproduction steps in a minimal code in the playground.
Reproduction steps:
- Click “d” button, then current id changes to 4, and name to d.
- Click “Show / Hide” button, then the content above is hidden.
- Click “Show / Hide” button again, then the content is back.
- Click “c” button, then current id changes to 3, and name to c.
- Click “b” button, then,
- Expected behavior: current id changes to 2, and name to b.
- Actual behavior: current id changes to 2, but name doesn’t change.
Reproduction
https://svelte.dev/playground/c10266b02aab40e58b93a9545c8ac639?version=5.16.1 (Reproducible)
https://svelte.dev/playground/c10266b02aab40e58b93a9545c8ac639?version=5.16.0 (Work as expected)
Logs
No response
System Info
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M2
Memory: 133.42 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.15.0 - ~/.volta/tools/image/node/20.15.0/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 10.7.0 - ~/.volta/tools/image/npm/10.7.0/bin/npm
pnpm: 9.6.0 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 131.0.6778.205
Safari: 18.2
npmPackages:
svelte: ^5.16.1 => 5.16.1
Severity
blocking an upgrade
Metadata
Metadata
Assignees
Labels
No labels