← All notes
/
ArchitectureState ManagementUX

The URL is the Source of Truth

In modern SPAs, we often over-engineer state management stores (Redux, Zustand) for data that belongs in the URL. If a user filters a dashboard by "Status: Active" and refreshes the page, that filter should persist. If they send the link to a colleague, the colleague should see the same filtered view.

If the state is not in the URL, it is ephemeral. My rule of thumb: If it changes the data payload, it belongs in the query string. Client-side stores should be reserved for truly transient UI states (like whether a modal is open or a menu is expanded), not for data definition.