Skip to content

[question] How to pass state across tree #39

Description

@slonoed

I have one single atom for state.
Some components may want to watch some parts of this atom.
But their parents pure components without data.

For example: page header contain user control. Header doesnt have any data from state, but user control have. In react I pass this state by context. And wrap user control in container that watch data in state and pass as props to user control. I can do it with rum, but I want to know is this best way?

Also my question not about only state atom, but about all things components may want deep in tree.
In my case is state and dispatcher (chan).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions