Stop putting your API data in Redux. There is a better way to handle loading, caching, and re-fetching.
Server State vs Client State
Important distinction: Client State is ephemeral (is the modal open?). Server State is a cache of remote data (user profile).
Why React Query Wins
React Query handles the hard parts of async: deduplication, background refetching, and cache invalidation. It deletes thousands of lines of boilerplate code.
const { data, isLoading } = useQuery({
queryKey: ['todos'],
queryFn: fetchTodos
})
It just works. The UI remains snappy, and data acts "live" without complex WebSocket setups for simple CRUD apps.
