Skip to content

Reactivity with runes should work in old syntax #9287

Closed
@enyo

Description

@enyo

Describe the problem

It's great that mixing Svelte 4 + 5 syntax will be possible! But this is only helpful in large code bases if reactivity can be maintained in both cases.

It is possible to use stores in runes mode, but the reactivity fails the other way around:

See this REPL

Specifically this line:

$: z = counter.value + 2

(Where counter.value is a $state)

Describe the proposed solution

I don't think there is an actual reason for this not to work, and it would make incrementally changing to runes a lot easier.

Alternatives considered

The alternative is to rewrite all components in one go that need to import runes.

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions