4 ms·
So I think this is basically an abstraction on top of useReducer which itself is kind of a state machine pattern. It’s a little verbose more my liking but I th
by isuckatcoding 5y ago
So I think this is basically an abstraction on top of useReducer which itself is kind of a state machine pattern.
It’s a little verbose more my liking but I think it could be powerful for large apps with lots of states.
- vikingcaffiene 5y agoThis is a Finite State Machine meaning there are a limited set of states and state transitions allowed. useReducer doesn’t have any of the state/transition validation logic which makes it an infinite state machine. Both are very useful. Different use cases though.