svelte: Svelte 5: Deeply nested state doesn't re-render when looping
Describe the bug
It seems that when looping through a deeply nested object, svelte doesn’t re-render when looping through object.
No errors are thrown in the logs which makes me think this may be a bug.
Reproduction
Click the update button and observe that the JSON.stringify correctly shows the update, but the each block isn’t updated with the new value.
Note: I’m using the $inspect to force the compiler to svelte 5 mode. Without it, it works as expected.
Logs
No response
System Info
Browser: Edge
Severity
blocking all usage of svelte
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 17 (15 by maintainers)
Commits related to this issue
- fix: adjust keyed each block equality handling (#10699) Fixes #10685 — committed to sveltejs/svelte by trueadm 4 months ago
Additional PRs related to this:
(Fixing
#each+$storescenarios using index or entire items as keys.)@dummdidumm I’ll take a look at this tomorrow and see what we can do 😃
This can’t be the expected behavior for stores, this is clearly a regression that needs to be fixed.