State is any data that can change over time and that the UI depends on to render. When state changes, the UI updates to reflect it. It's the "memory" of your application at any given moment.
Examples of state
✓ A counter value, a form's input text, a toggle (on/off)
✓ Whether a modal is open, the active tab, loading/error flags
✓ The logged-in user, items in a cart, fetched API data
✓ The current theme (dark/light), selected filters
State drives the UI
() {
[count, setCount] = ();
(
);
}
