We cannot use redux-undo because not all state change can be mapped to a user history unit, so I create checkpointEnhancer.
It add a checkpoint attribute to redux state to store histories. This history pool is controlled by developers: a history unit is added only when developers want to.
checkpointEnhancer also comes with two action creators: addCheckpoint and jumpCheckpoint. Developers dispatch these actions to add/jump between history units.
We cannot use
redux-undo
because not all state change can be mapped to a user history unit, so I createcheckpointEnhancer
.It add a
checkpoint
attribute to redux state to store histories. This history pool is controlled by developers: a history unit is added only when developers want to.checkpointEnhancer
also comes with two action creators:addCheckpoint
andjumpCheckpoint
. Developers dispatch these actions to add/jump between history units.