v1.0.0
Version 1.0.0 release! This has some Breaking Changes and also new features!
undo
has been renamed toundoMiddleware
- import { undo } from 'zundo';
+ import { undoMiddleware, UndoState } from 'zundo';useUndo()
is no longer a hook, the object returned fromuseUndo()
is now part of the store you create
use like this
const {
bears,
increasePopulation,
removeAllBears,
decreasePopulation,
undo,
clear,
redo,
getState,
} = store;
New features include:
-
a simplified API
-
the ability to have multiple undoable stores in a single app
-
a create function from zundo to create your undoable stores
-
Update README.md 113f31e
-
Merge pull request #7 from charkour/multiple-undo-stores eaca784
-
update documentation 3861aa5
-
multiple undo stores c65a8ca
-
separate files 15e78f3
-
update zustand dependency 4f6dc47
-
Update README.md 5f772fe
-
inject useUndo into the undo middleware 524478a
-
create undoStore factory 147c08d