Skip to content

UI Reactivity Issue with Store Changes in Svelte 5 #16007

Open
@mlage-jw

Description

@mlage-jw

Describe the bug

In Svelte 5, store updates no longer trigger UI reactivity in the same way they did in Svelte 4. While the store itself does update, the UI does not reflect these changes properly unless the $state version is used.

Expected Behavior

The UI should automatically update in response to store changes, as it did in Svelte 4.

Actual Behavior:

In Svelte 5, store updates do not trigger UI reactivity as expected, leading to inconsistent behavior.

Additional Information

If this change in behavior is intentional, clarification on how to properly ensure UI reactivity with stores in Svelte 5 would be helpful.

Reproduction

Steps to Reproduce

  1. Open the following REPL for Svelte 4: Svelte 4 REPL

    • Click the INC button.
    • The UI updates correctly when the store changes.
  2. Open the following REPL for Svelte 5: Svelte 5 REPL

    • Click the INC button.
    • The store updates internally, but the UI does not reflect the change. The $state version works fine.

Logs

System Info

REPL

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions