It continues to surprise me how the React ecosystem works its way through problems like state management. This looks like a nice, understandable way of looking after state (and simpler than Redux in my initial estimation). It also seems to be written similarly to Hooks, aside from needing render props.
What happens when you subscribe to more than one store? Something like this?
constCounter=()=>(<Subscribeto={[CounterStore,OtherStore]}>{(counterState,otherState)=>(<div>
// other UI
</div>)}</Subscribe>)
It continues to surprise me how the React ecosystem works its way through problems like state management. This looks like a nice, understandable way of looking after state (and simpler than Redux in my initial estimation). It also seems to be written similarly to Hooks, aside from needing render props.
What happens when you subscribe to more than one store? Something like this?
That's exactly how it works :)!
Regarding hooks - I'm testing out how you can use hooks with a store. An example of an up and coming hooks api:
Ah, cool that you can use it with Hooks too. Thanks!