UI state is data your app owns and controls locally (toggles, form inputs, selected tab). Server state is data that lives on a server and is merely cached on the client (fetched users, products, posts). They have fundamentally different characteristics and need different tools.
The key differences
UI state Server state
Ownership you own it (client) the server owns it; client caches
Freshness always current can become STALE (server changed it)
Sync needed? no yes — refetch, invalidate, revalidate
Shared? usually one client shared across users/devices/tabs
Concerns just set/read it caching, loading, errors, retries, dedup
