FrontendBeginner
State
PronunciationSTAYT
Definition
Data that can change while the app runs and that the screen depends on, such as what the user typed or whether a menu is open.
Where you hear it
React and Vue lessons, and bug reports ("the state is out of sync").
Examples
The cart count is stored in the component state.
The state changed, so React re-rendered the page.
Common mistake
Keeping the same data in two places. When one copy changes and the other does not, you get bugs.