xplato / useUndoable

↪ React hook for undo/redo functionality (with batteries included)
MIT License
168 stars 7 forks source link

how to delay saving the state to the past #34

Closed DatTN95 closed 3 months ago

DatTN95 commented 3 months ago

hi guys, i use react flow v11 currently, the past stores all states of the nodes. In React Flow, there are two events: onNodeDragStart and onNodeDragStop. my idea is to stop recording the state in the past when onNodeDragStart occurs, and only save to the past when onNodeDragStop happens. i can do this?