State allows components to 'remember' information and update in response to user actions.
1State vs Props
While Props are like arguments passed to a function, State is like variables declared within a function. Props are passed *into* the component; State is managed *inside* the component.
2Rules of State
1. Don't mutate directly: Always use the setter function.
2. Snapshots: State updates don't happen instantly; they trigger a new render.
3. Functional updates: Use (prev) => prev + 1 when the new state depends on the old one.
