I Finally Understood JavaScript Closures (And Why They Matter in React)
The "Magic" Black Box
For the longest time, I treated certain parts of JavaScript as "magic." especially when I started learning the MERN stack.
I would write const [count, setCount] = useState(0) in React, and somehow, React would "remember" the val...
devuzair.hashnode.dev3 min read