ReadyNative

Data · Fetching data from your API

Expo + SWR

SWR in an Expo SDK 57 app for iOS and Android, wired by one command and checked by doctor.

SWR is the small data layer: a stale-while-revalidate cache with a global fetcher, configured in src/lib/swr.tsx. I'd pick it over react-query when you mostly read data and want the smallest possible API surface - a string key is all a hook needs - and over apollo whenever your backend isn't GraphQL. It ships the same src/lib/api/client.ts (fetchJson) as the TanStack Query module, so switching between the two doesn't churn your API code.

At a glance

Runs in Expo Go
Yes
Files added
8
npm packages
1
Keys to paste
EXPO_PUBLIC_API_URL
Included in
Starter and Pro

Set it up

bun run setup --data swr

Setup 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 SWR docs.

Other data options

Get it

SWR ships in Starter and Pro: one payment, lifetime updates. See pricing or browse every module.