The type of the undo/redo data.
Check if redo is possible
true if there are states to redo to
Check if undo is possible
true if there are states to undo to
Redo to the next state
Reset the undo/redo history with a new initial value
Set a new current state
The current undo/redo state
OptionalsubscribeSubscribe to state changes (optional, for triggering re-renders)
Callback function that will be called whenever state changes
Unsubscribe function
Undo to the previous state
The undo/redo object. Includes the current state and methods to manipulate it.