Muhammed Senussi
Muhammed Senussi
  • Muhammed Senussi
Most of Your State Is Server StateFrontend

A great deal of frontend state management exists to solve a problem that is not a state management problem.

Two different things

Client state is genuinely yours: which tab is open, what is in the form, whether the sidebar is collapsed. Server state is a copy of something that lives elsewhere and can change without telling you. Treating the second like the first is why applications show stale data and why so much code is dedicated to keeping copies in sync.

A query library that understands staleness, refetching and request deduplication replaces most of that code and handles the cases people forget: what happens on window focus, on reconnect, when two components ask for the same thing at once.

What is left after that separation is usually small enough that a signal or a context does the job, and the store you were going to introduce turns out to be unnecessary.

1 Comments

  • Sanne de Vries

    March 3, 2026

    We deleted about 2000 lines of reducers doing this. The remaining client state fitted in one small service.

Leave a comment