v0.1.0-beta.22
Undo/Redo
Introducing the ability to easily add undo & redo functionality to actions!
- Create the undo (negate) action by returning a function from
perform
:createAction({ perform: () => { // logic to perform return () => { // logic to undo } } })
- Perform actions using
action.command.perform
- Explicitly undo actions using
action.command.undo
, redo usingaction.command.redo
Fixes
- Deprecated the usage of
useDeepMatches
in favor of justuseMatches
. #124 - Reworked a few internal types; e.g.
BaseAction
renamed toAction