You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to #15446. The reason this is happening is because we're now associating the root effect created in toStore to the template effect – as that is what is calling the read on the toStore. When the template effect gets invalidated, it now destroys the root effect each time – killing the store contract entirely.
Describe the bug
From 5.22.3 onwards, usage of toStore seems broken.
A simple case of wrapping some state
and then using it in the template for example
The count state updates as expected, but the count store never receives a new value.
Reproduction
See the following basic example:
https://svelte.dev/playground/0892822945674a63ad0d61aca0eba214?version=5.22.3
It works when running on 5.22.2:
https://svelte.dev/playground/0892822945674a63ad0d61aca0eba214?version=5.22.2
It also starts to work if you $inspect the store
https://svelte.dev/playground/a1380d57e6c24ab3aff00d8b74cda745?version=5.22.3
Logs
System Info
System: OS: Linux 6.11 cpe:/o:nixos:nixos:25.05 25.05 (Warbler) CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon 780M Graphics Memory: 41.81 GB / 60.64 GB Container: Yes Shell: 5.9 - /run/current-system/sw/bin/zsh Binaries: Node: 22.14.0 - /etc/profiles/per-user/james/bin/node Yarn: 1.22.22 - /etc/profiles/per-user/james/bin/yarn npm: 10.9.2 - /etc/profiles/per-user/james/bin/npm Browsers: Chromium: 134.0.6998.88 npmPackages: svelte: ^5.23.2 => 5.23.
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: