You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.
stateGen looks like the beginnings of something like Redux.
Would it be possible/are you planning to extend stateGen to support more of the Redux pieces like the reducers and maybe middleware too? Something reducer like would be incredibly handy.
The text was updated successfully, but these errors were encountered:
Having never really used Redux I can't claim to being able to agree with your assertion or otherwise!
But maybe some background will give you the answer you need:
we have a big frontend app that uses an immutable graph of data
we use an RPC-like approach to modify that data graph, with deltas being sent to the frontend
state is maintained separately and, for the purposes of this discussion, is entirely frontend (save the persistence)
some components (e.g. dropdowns) maintain their own "private" state in order to function properly
some components need to share state
some such components share state by being passed props by a parent component
other such components need to share state but are sufficiently disconnected as to make props passing ugly/near impossible
we want to be able to persist some state
For points 7 and 8 we use a state tree generated by stateGen. Instead of passing values as props we instead pass references to nodes/leaves in the state tree.
These nodes/leaves support the concept of publishing updates when values beneath them change.
One thing not currently supported by stateGen (but that does exist in our Typescript-world) is the ability to Transact(func ()) on the state tree (can be called from any node/leaf) - the function you pass in then gets called and for the duration of that callback notifications get queued and fired when the function returns. This should be trivial to add to stateGen.
stateGen
looks like the beginnings of something like Redux.Would it be possible/are you planning to extend
stateGen
to support more of the Redux pieces like the reducers and maybe middleware too? Something reducer like would be incredibly handy.The text was updated successfully, but these errors were encountered: