expo-data-fetching
Use when implementing or debugging ANY network request, API call, or data fetching.
Skill by expo
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/expo-expo-data-fetching
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend, data, api-integration, debugging
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/expo-data-fetching
What's inside
- Skill name
expo-data-fetching- Description
- Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, loading/empty/error screen states, and Expo Router data loaders (`useLoaderData`).
- License
- MIT
- Instructions
- 473 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (4)
- SKILL.md
- openai.yaml · agents/
- expo-router-loaders.md · references/
- offline-and-cancellation.md · references/
SKILL.md (first lines)
# Expo Networking
**You MUST use this skill for ANY networking work including API requests, data fetching, caching, or network debugging.**
## References
Consult these resources as needed:
```
references/
expo-router-loaders.md Route-level data loading with Expo Router loaders (web, SDK 55+)
offline-and-cancellation.md NetInfo network status, offline-first React Query, AbortController
```
## When to Use
Use this skill when:
- Implementing API requests
- Setting up data fetching (React Query, SWR)
- Using Expo Router data loaders (`useLoaderData`, web SDK 55+)
- Debugging network failures
- Implementing caching strategies
- Handling offline scenarios
- Authentication/token management
- Configuring API URLs and environment variables
## Preferences
- Avoid axios, prefer expo/fetch
## Every Screen Has Four States
Design **loading**, **error**, **empty**, and **content** for screens that load data. These can overlap: a refresh error should coexist with cached content.
- **Loading ≠ empty.** Empty means *resolved with zero items*, not missing data. Handle initial loading, failure, and hydration before checking list length. In TanStack Query v5, `isLoading` means the first fetch is running; a disabled or offline-paused query can have no data without being loading. Show the prerequisite or offline state in that case.
- **Empty is a designed state, not a blank list.** Use `ListEmptyComponent` on FlatList/FlashList: explain why it is empty and offer the relevant next action. "No items yet" can offer Create; "No results" should offer changing or clearing the search/filter.
- **Refetches keep stale content.** Render cached `data` even if a refresh fails, with a nonblocking error and retry. Use `isLoading` for first-fetch spinners and `isFetching` for background activity; prefer a skeleton for a slow initial load with a known layout, and `RefreshControl` for user-initiated refresh.
- **Gate on hydration.** When initial UI or a redirect depends on persisted state (auth token, onboarding flag), the root layout renders nothing - or the splash - until that state has loaded. Deciding on unhydrated state flashes the wrong screen on every cold start and misroutes deep links that arrive before hydration.
**Saves preserve work.** While a mutation is pending, disable repeat submission. On failure, retain the draft, show an inline error, and let the user retry; clear or dismiss only after success. If updating optimistically, restore the previous value or mark the edit as unsynced on failure. Verify with a failed save followed by retry.
## Common Issues & Solutions
### 1. Basic Fetch Usage
**Simple GET request**:
```tsx
const fetchUser = async (userId: string) => {
const response = await fetch(`https://api.example.com/users/${userId}`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
};
```
**POST request with body**:
```tsx
const createUser = async (userData: UserData) => {
const response = await fetch("https://api.example.com/users", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify(userData),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.message);
}
return response.json();
};
```
---
### 2. React Query (TanStack Query)
**Setup**:
```tsx
// app/_layout.tsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60 * 5, // 5 minutes
retry: 2,
},
},
});
export default function RootLayout() {
return (
<QueryClientProvider client={queryClient}>
<Stack />
</QueryClientProvider>
);
}
```
**Fetching data**:
```tsx
import { useQuery } from "@tanstack/react-query";
function UserProfile({ userId }: { userId: string }) {
const { data, fetchStatus, error, refetch } = useQuery({
queryKey: ["user", userId],
queryFn: () => fetchUser(userId),From expo/skills, MIT.
More from expo/skills
- 0.842score
eas-simulator
expo
Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
eas-observe
expo
Use for anything related to EAS Observe - adding `expo-observe` to an Expo project (AppMetricsRoot/ObserveRoot HOC, markInteractive and…
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-app-clip
expo
Add an iOS App Clip target to an Expo app.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
eas-update-insights
expo
Check the health of published EAS Update: crash rates, install/launch counts, unique users, payload size, and the split between embedded and OTA users per…
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-web-to-native
expo
Migrate an existing web React app to a native iOS/Android app with Expo.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-ui
expo
Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-module
expo
Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript).
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-examples
expo
Expo's official example projects - the expo/examples repo of ~70 `with-*` integrations (Stripe, Clerk, Supabase, OpenAI, maps, Reanimated, SQLite, Skia…
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-design-system
expo
Build and maintain a design system inside an Expo app - a reusable theme of design tokens (color, spacing, typography, radius, shadow, motion), reusable…
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-brownfield
expo
Integrate Expo and React Native into an existing native iOS or Android app.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
eas-workflows
expo
Helps understand and write EAS workflow YAML files for Expo projects.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
eas-app-stores
expo
Build and submit iOS and Android apps with EAS to TestFlight, the App Store, or Google Play.
SkillAFreshness: A★ 3KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 3,006
- Forks
- 197
- Open issues
- 22
- Last commit (this folder)
- Oct 22, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/expo/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from expo
- 0.842score
expo-module
expo
Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript).
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-examples
expo
Expo's official example projects - the expo/examples repo of ~70 `with-*` integrations (Stripe, Clerk, Supabase, OpenAI, maps, Reanimated, SQLite, Skia…
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-app-clip
expo
Add an iOS App Clip target to an Expo app.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-ui
expo
Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-web-to-native
expo
Migrate an existing web React app to a native iOS/Android app with Expo.
SkillAFreshness: A★ 3KClaude Code +9 - 0.842score
expo-design-system
expo
Build and maintain a design system inside an Expo app - a reusable theme of design tokens (color, spacing, typography, radius, shadow, motion), reusable…
SkillAFreshness: A★ 3KClaude Code +9
Cite this page
expo-data-fetching skill. Agent Mart. https://agentmart.dev/skills/expo-expo-data-fetching (last updated 2026-10-24)