GitHub

Best React data fetching libraries

Libraries that fetch, cache and refresh server data in React. @tanstack/react-query leads with about 82.4M real installs a week, followed by swr with about 26.7M.

packagereal installs / weeknpm / weeknoiselast releaseconfidence
1. @tanstack/react-queryHooks for managing, caching and syncing asynchronous and remote data in React 82.4M 82,427,046 under 1% Nov 2026 high
2. swrReact Hooks library for remote data fetching 26.7M 26,672,336 under 1% Aug 2026 high
3. @apollo/clientA fully-featured caching GraphQL client. 8.39M 8,391,399 under 1% Nov 2026 high
4. urqlA highly customizable and versatile GraphQL client for React 1.53M 1,529,029 under 1% Aug 2026 high

Ranked by real installs. That measures use, not quality: read the notes below before choosing. Mirror spikes and crawlers removed. CI and dependency installs still count, so this is not a head count. Noise: the share of npm's count that mirror spikes and crawlers account for. What remains still includes CI and dependency installs. Rows are refreshed in rotation, the oldest here on Nov 6, 2026.

How do they differ?

TanStack Query and SWR cache the result of any async function, so they work with REST and GraphQL alike. Apollo Client and urql are GraphQL clients with their own caches.

Check a package