The Quest Begins (The "Why")
Honestly, the first time I tried to build a simple todo app with React I felt like I was stuck in a Groundhog Day loop. Every time I clicked “Add”, the UI would flicker, the state would reset, and I’d swear I saw a tiny Yoda whispering, “Patience, young padawan… but maybe you’re missing something.” I’d spent hours chasing bugs that felt like the final boss in Dark Souls – relentless, unforgiving, and always one step ahead.
The problem? I was treating React like a static HTML page, manually toggling classes and fiddling with DOM APIs. I kept thinking, “If I just call setState in the right place, it’ll work.” Spoiler: it didn’t. My component would re‑render on every prop change, causing infinite loops that made the browser hang like a frozen Matrix loading screen.
That’s when I remembered a line from The Empire Strikes Back: “Do or do not. There is no try.” I realized I needed to stop trying to hack the UI and start letting React manage the state for me. Enter the hooks – the lightsaber of modern React.
The Revelation (The Insight)






