Skip to content

Conversation

@gorj-tessella
Copy link

Ordinary useState/setState accepts a callback as the argument which is evaluated with the previous state, so useUndo/set/reset should as well.

@AntonioClarke
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants