arrow_backBACK TO DRILLS
White Beltstate-basics
Local Variable Update Inside a Click Handler
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?