State yaiku data apa wae sing bisa owah-owahan sajroning wektu lan UI gumantung ing dheweke kanggo nggambar. Nalika state owah, UI ngganti kanggo ngrefleksikake. Iku "memori" aplikasi mu saben wektu.
Conto-conto 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 nggerak UI
() {
[count, setCount] = ();
(
);
}
