DEV Community

Discussion on: Undo/Redo in React Using XState

Collapse
 
chautelly profile image
John

Really cool! Did you look into using the history state at all? (I have no clue if that would apply or work at all tbh.)

Collapse
 
robertbroersma profile image
Robert

Thanks!

I believe history state is for telling the machine to go back to the last state value of that region. So when returning to a sub-machine for instance you could start in something other than the initial state.

Similar, but this is for returning to a different infinite state!