arrow_backBACK TO DRILLS
White Beltstate-basics

Local variables vs state persistence

“A React component stores a counter in a regular local variable and updates it inside a click handler. The variable value changes in the handler, but the UI never updates. Why?”

BugDojo
BlogFAQ

© 2026. Carved in code.