Skip to content

Clarity around using Runes in .svelte.(js|ts) files in docs #14300

@Nickersoft

Description

@Nickersoft

Describe the problem

I remember reading awhile ago that when using Runes outside of .svelte files, in order to read their values correctly you should be using getters and setters, as simply exporting the rune from the file and reading it in your component won't work. Last I checked with the latest version of Svelte 5 this is still the case, but I can't find this mentioned anywhere in the docs.

Describe the proposed solution

This (rather important) gotcha should probably be getting called out in either the .svelte.(ts|js) section or the Runes section of the new docs site

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