Skip to content
Discussion options

You must be logged in to vote

Server state is data whose authoritative copy lives on a remote system (a database, an API, another service) and can only be accessed asynchronously. Your app holds a local snapshot of it, not the source of truth.

Three properties make it different from regular state:

  • The truth can change without your app knowing. Another user's action, a background process, or a TTL can make your copy stale while you're looking at it.
  • Multiple clients may be reading and writing the same data simultaneously.
  • You can't own it. You can issue updates, but you can't mutate the canonical value directly in memory.

Client state is the opposite: modal open/closed, active tab, what's in a search box. You own it,…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rob-johansen
Comment options

@Zelys-DFKH
Comment options

Answer selected by rob-johansen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants