frontend
Undoable command
Model user actions as reversible commands so they can be executed, undone, and redone.
Intent: Support edit history and reversible user interaction.
Problem: Undo logic becomes tangled when state changes happen directly in UI handlers.
Solution: Wrap each action in a command object that knows how to execute and undo itself.
Dependencies
Related variants
Examples
Best for editors, design tools, and any interactive surface with history controls.