Concept Flow - Callback functions for state updates
User triggers event
Event handler calls setState
setState uses callback function
Callback receives previous state
Callback returns new state
React updates state
Component re-renders with new state
When updating state based on previous state, React calls the callback with the old state, then updates state and re-renders.