Skip to content

#each may not update when passed $derived containing $store #13569

Open
@dummdidumm

Description

@dummdidumm

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-grained

Reproduction

playground link

(it works when you make each aware of the store:
playground link)

Logs

No response

System Info

Svelte version: 5.0.0-next.264

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions