Skip to content

Documentation improvement suggestion for Runes DEEP state section. Β #14975

@peterhoward42

Description

@peterhoward42

Describe the problem

The documentation section on Runes Deep State is quite hard to understand.
Specifically it seems from the conversation in this Reddit thread , that many people fail to grasp after reading it, what the benefits or relevance of it is. I didn't get it straight away, but was overjoyed when I realised how useful it was.

https://www.reddit.com/r/sveltejs/comments/1hwtaki/runes_are_a_great_improvement_over_stores/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Describe the proposed solution

To have a preliminary section that introduces the topic with a message that follows the pattern "if you want to achieve this, then deep state can help you like this...". (I believe that an active-voice introduction will pull the reader into the topic).

To illustrate:

"The DEEP STATE capabilities of Runes $(state) help, when you have for example a Component composed of several related sub components which conceptually all use a data model in common, and where changes to the state in one might need to ripple or propagate changes to the others. In this case you can define a single rune $state object as the data model that can be shared (imported) into all the components that want it. With this arrangement any change to any field in that object will trigger reactivity in all the consumers of that field. It's called DEEP because changes propagate up from the fields to the parent object. And it works (recursively) if you nest objects - which lets you craft a well structured view model". It also helps you to manage the interplay logic in the data model in a dedicated place, leaving the components to focus on rendering the view.

Importance

nice to have

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