How to perform undo in Recoil's history example

456 Views Asked by At

https://recoiljs.org/docs/guides/atom-effects/#history-example

In the link above, the documentation shows an example for keeping track a history of state changes. Each state has an undo method that would revert to the previous state.

I'm having a difficult time figuring out how to actually access the undo method. Printing out the value of the atom doesn't have any reference to history or undo. I also have my atom persisting to local storage which, again, has nothing extra, as I would expect.

0

There are 0 best solutions below