State Management · Senior · Question 44 of 75
Do you still need a client cache library (TanStack Query) with React Router loaders?
- ✓Correct answer: Often not; loaders + revalidation cover many apps, but a cache helps with shared data and fine-grained control
- 2Always - loaders don't work without a cache library
- 3Never - combining them is impossible
Explanation
Loaders tie data to routes and revalidate after actions. For data used across many routes, background refetching, infinite lists or offline, teams combine them: loaders call queryClient.ensureQueryData, components use useQuery.