Skip to main content

React Query

Libraries and best practices for fetching, caching, synchronizing and updating server state

Data fetching is simple, async state management is hard, this is why you need React Query

Endorsements

Social Proof: Projects that have elected to use React Query in their data sync strategy.

  • Scaffold-eth

Comparisons

Redux Toolkit vs React Query

Case Against

Arguments against using React Query?

Context

Questions

When does React Query add complexity without value?

  • How do you invalidate queries that depend on mutations across routes?
  • What is the boundary between React Query's cache and Next.js fetch cache?
  • When should you replace React Query with server components and streaming?