Design Patterns · Senior · Question 24 of 75

Why is separating "server" and "client" state considered an important architectural decision?

Explanation

Server data is a copy that goes stale: it needs caching, invalidation, retries and deduplication (TanStack Query, RTK Query, RSC). UI state (whether a dialog is open, a form draft) belongs to the client. Mixing them in one store leads to manual syncing and bugs.

Further reading

Problem with a question

Design Patterns · Senior · question 24

Test yourself

Take the Design Patterns · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz