Skip to content
>devspeak
← glossary
level 7Architecture

State

also: app state, application state, ui state

The information your app is holding and remembering right now, like what's in the cart, who's signed in, or which tab is open.

a bit more technical

The data that describes a system at a moment in time and can change: UI state (a menu is open), session state (who is logged in), server state (records in the database). Bugs often come from state that is out of date, duplicated, or changed unexpectedly.

picture it

A board game in progress: where every piece is, whose turn it is, the score. Pause and write that down, and you've captured the game's state.

why it matters

Many confusing bugs are state bugs: the page shows old data, the cart empties on refresh, a filter resets. Knowing the word helps you describe them clearly to your agent.

what your agent might say
agent
The bug is stale state: the cart count is read once when the page loads and never updated after you add an item.
how you might use it
you → your agent
The selected filters reset when I go back to the list. Where is that state stored, and can it survive going back and forth between pages?
common mistake

Thinking state only means data in the database. State also lives in the browser, in memory, in the URL and in cookies, and those copies can disagree.