This is a very common feature in most of the drawing/canvas tools where user can perform undo operation on the changes they had made.
Since we record every action and it goes through board component, you can store list of operation/changes made with proper schema. And then when user requests undo, you can go back in time and it would roll the changes.