- Notifications
You must be signed in to change notification settings - Fork10
Closed
Description
This enhancement builds on from#7. The currentclear
action will empty the undo/redo stacks and set the state of the store when theemptyState
mutation is committed. Thenewreset
action should empty the undo/redo stacks, but still maintain the state of the store up to this particular point.
IS
- given done:
[mutationA, mutationB]
, undone:[mutationC]
, state:emptyState + mutationA, mutationB
- when
clear()
is dispatched - then done:
[]
, undone:[]
, state:emptyState
SHOULD
- given done:
[mutationA, mutationB]
, undone:[mutationC]
, state:emptyState + mutationA, mutationB
- when
reset()
is dispatched - then done:
[]
, undone:[]
, state:emptyState + mutationA, mutationB