Restrict state transitions according to graph
See original GitHub issueShould switch reducers based on the current state in order to ensure that the program can’t enter bad states.
- For each state, build a reducer that only responds to transitions listed for that state in the state graph
- Create a parent/meta reducer that switches the invoked child reducer based on the current state
Sample state graph:
const fetchingStates = [
['initialize', 'idle',
['fetch', 'fetching',
['cancel', 'idle'],
['report error', 'error',
['handle error', 'idle']
],
['report success', 'success',
['handle success', 'idle']
]
]
]
];
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Transition Graph - an overview | ScienceDirect Topics
Figure 3 is an example of contact state transition graph, (a) shows models of an object and environment. From these models, we can...
Read more >LEARNING GRAPHICAL STATE TRANSITIONS - OpenReview
and can either produce a final graph representing its current state, ... Each unit uses a reset gate r and an update gate...
Read more >Construct and Run a Stateflow Chart - MATLAB & Simulink
Build state transition diagrams in the Stateflow graphical programming editor. ... a Stateflow chart that you can simulate as a block in a...
Read more >State Chart XML (SCXML): State Machine Notation for ... - W3C
When a transition is taken, the state machine will exit all active states that are proper descendants of the LCCA, starting with the...
Read more >Finite-state machine - Wikipedia
The FSM can change from one state to another in response to some inputs; the change from one state to another is called...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, I think I get it completely. Let me think on it, and maybe I’ll attack it tomorrow. Thanks for your time and help understanding this!
Published as v1.0.3. Thanks @dash- !