DEV Community

Discussion on: Undo/Redo in React Using XState

Collapse
 
marcelkalveram profile image
marcelkalveram

Nice solution! I've had a very similar problem recently and tried out the approach above, but I also needed fully context support (it should preserve the context object when going back), so I built my xState wrapper which supports this: github.com/marcelkalveram/xstate-u...

It's not perfect and has other downsides (no redo, doesn't work with interpreted machines) but I thought I'd share it regardless in case anyone stumbles upon this post and is looking for the kind of wrapper I made.