Open dummdidumm opened 2 hours ago
Funnily, the reproduction link shows a working version.
Here is a non-working version: playground link
And here is the same version, but with the incItem
function changed to replace the item in the array, instead of updating it in-place: playground link
replacing the item in the store array triggers reactivity in the each block. updating in-place does not.
Describe the bug
When a
$derived
that subscribes to a$store
is passed to an#each
, the contents of the each block may not properly update. That's because our static analysis (which was added in #12808) doesn't recognize that the array is coarse-grainedReproduction
playground link
(it works when you make each aware of the store: playground link)
Logs
No response
System Info
Severity
annoyance