Client state vs Server state
Client State
- Ephemeral - It goes away when the browser is closed.
- Synchronous - It's instantly available.
- Client-owned - It stays local to the browser that created it.
- Always up-to-date.
Server State
- Persisted remotely - The client has no control over what is stored or how it is stored.
- Asynchronous - It takes a bit of time for the data to come from the server to the client.
- Shared ownership - Multiple users could change the data.
- Potentially out-of-date