In reality, you're gonna quickly run into battles with state's that are complex and unclonable - in flight fetch requests, circular references, webasm modules that have internal state, etc.
Then there are things where the browser already implements undo functionality like navigation (back button) and editing text boxes. Your undo is going to have to work nicely with those.
You'll either end up with a buggy undo implementation, or end up spending a lot of engineering time hunting corner cases.
Then there are things where the browser already implements undo functionality like navigation (back button) and editing text boxes. Your undo is going to have to work nicely with those.
You'll either end up with a buggy undo implementation, or end up spending a lot of engineering time hunting corner cases.