TanStack Query is the default data layer: a cache, retries and refetch-on-foreground for REST-shaped APIs, wired up in src/lib/query.tsx. I'd pick it over swr when you want mutations, query invalidation and devtool-grade cache control, and over apollo whenever your backend isn't GraphQL. It comes with src/lib/api/client.ts - a small fetchJson wrapper that resolves relative paths against EXPO_PUBLIC_API_URL - so your hooks stay free of URL plumbing.
At a glance
- Runs in Expo Go
- Yes
- Files added
- 7
- npm packages
- 1
- Keys to paste
EXPO_PUBLIC_API_URL- Included in
- Free, Starter and Pro
Set it up
bun run setup --data react-querySetup copies the module in, installs SDK-matched versions and removes the options you did not pick. Then bun run doctor lists every key still missing, with a link to where you get it. The step-by-step guide is in the TanStack Query docs.
Other data options
- Apollo Client - GraphQL client + normalized cache · Expo Go OK
- SWR - stale-while-revalidate hooks · Expo Go OK
Get it
TanStack Query is part of the free tier: clone it on GitHub. Starter and Pro add the stack picker, EAS store builds and doctor.