Your Undo Button is Just a Stack of Pancakes
TL;DR: I implement undo functionality using a Stack data structure because it follows the Last-In-First-Out (LIFO) principle. Each state change is pushed onto the stack. When I trigger an undo, I pop
doogal.dev5 min read