cedux
cedux copied to clipboard
state should be immutable
One of the best features of Redux is the state is never actually modified, instead it is cloned and the clone is modified and returned as current state. This allows for the most helpful feature of time travel debugging where actions can be recorded and replayed to create a situation and tests. I may PR if I get time.
Good point. Is your concern just that the state mutations don't happen atomically with the current implementation? With the current implementation, if an ISR were to fire during the cedux_run_x
function and that ISR had a handle to the store, it's possible that it would access the store in an intermediary state. Is that what the issue you had in mind?