use-undo
use-undo copied to clipboard
Handle callbacks in set/redo calls
Ordinary useState/setState accepts a callback as the argument which is evaluated with the previous state, so useUndo/set/reset should as well.
Ordinary useState/setState accepts a callback as the argument which is evaluated with the previous state, so useUndo/set/reset should as well.
Would the typescript declaration have to be updated as well? https://github.com/homerchen19/use-undo/blob/master/index.d.ts