Is it possible to use @cycle/state for local state?

57 Views Asked by At

It seems that @cycle/state was intended to be used once per app, wrapping main. Is that true?

In other words, it seems that @cycle/state does not provide a solution for local state. And I am trying to figure out, whether reusing it inside the hierarchy could provide such a solution.

Is it possible to use it multiple times down the hierarchy for the purpose of local state?

1

There are 1 best solutions below

0
On

Yes, there is no problem with that as you can use the second argument to specify another name for the second state. In fact this might help you: https://gist.github.com/jvanbruegge/9af17f4f5fca8bb3e6198ebe65afac55