Support zustand v4 with an updated API. This is an experimental release that will be similar to v2 of zundo.
BREAKING CHANGES
The methods undo
, redo
, clear
, setIsUndoHistoryEnabled
, and getState
are not accessed from useStore.temporal
instead of useStore()
.
const { undo, redo, clear, setIsUndoHistoryEnabled, getState } = useStore.temporal;
What's Changed
- reworked types, methods now on useStore by @funwithtriangles in #44
Full Changelog: v1.6.0...v2.0.0-experimental.0