Skip to content

Refactor grouped stores into combined state #1271

@eyeseast

Description

@eyeseast

We have lots of places in the codebase where we have groups of stores that all touch or relate to the same data. In Svelte 3 and 4, this made sense, because stores are built for granular values that can be updated individually, and because reactivity only happened at the top level of the namespace.

Svelte 5 allows us to nest $state() inside classes, which means we can group things that belong together. This will actually bring us back to something like Svue, except without its compilation downsides.

Related research: https://github.com/MuckRock/research/tree/main/svelte5-reactive-patterns

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions