How to implement undo/react on canvas with React?

To implement undo/redo functionality with React you don’t need to use Konva‘s serialization and deserealization methods.

You just need to save a history of all the state changes within your app. There are many ways to do this. It may be simpler do to that if you use immutable structures.

Instructions: Try to move the square. Then undo/redo your actions.

Enjoying Konva? Please consider to support the project.