We used to put everything in Redux. API responses, UI flags, Form state. This was a mistake. The Separation Client State: Ephemeral. “Is the modal open?”. Use `useState`. Server State: Persisted remotely. “List of users”. It is asynchronous and stale by definition. Use React Query. React Query handles caching, background refetching (swr), and retries automatically. […]
Read more →