Concept Flow - Updating state
Initial Render
Display UI with state
User triggers event
Call setState(newValue)
React schedules re-render
Component re-renders with updated state
DOM updates to reflect new state
Wait for next event or interaction
This flow shows how React updates state: user event triggers setState, React re-renders the component, and the UI updates.