# Build Expo Networking Flows

Mobile apps need reliable API requests, caching, token handling, and offline behavior. This skill guides Expo developers through fetch, React Query, SecureStore, NetInfo, and environment-based configuration.

## Install

```bash
npx skillstore add expo/native-data-fetching
```

## Metadata

- Status: approved
- Slug: expo-native-data-fetching
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r1
- Version status: valid
- Tree hash: 542c2ba504c1f47ed17fb372cb0a9e6073ef9906992c91bceb17d23a8f61c945
- Author: expo
- GitHub username: expo
- License: MIT
- Repository: https://github.com/expo/skills/tree/main/plugins/expo-app-design/skills/native-data-fetching/
- Ref: a06681402992ceae98ba04d54cfd4ab004862696
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, env\_access
- Quality score: 80
- Quality tier: silver
- Public page: https://skillstore.pages.dev/skills/expo-native-data-fetching
- Manifest: https://skillstore.pages.dev/api/skills/expo-native-data-fetching/manifest

## Capabilities

- Shows fetch examples for GET and POST requests with response status checks.
- Guides React Query setup, query usage, mutations, retry behavior, and cache invalidation.
- Explains API error classes, retry logic, and request cancellation with AbortController.
- Covers token storage with expo-secure-store and authenticated request wrappers.
- Describes offline detection with NetInfo and React Query online management.
- Shows Expo public environment variables for API base URLs across environments.

## Use Cases

- Ship Reliable API Calls: An Expo developer can add fetch wrappers, status checks, and typed errors for a new mobile feature.
- Choose a Caching Strategy: A technical lead can compare simple fetch patterns with React Query for shared server state.
- Prepare Offline Authentication: A product engineer can combine SecureStore, NetInfo, and retry behavior for authenticated offline-capable screens.

## Prompt Templates

### Add a Basic Request

```
Show me how to fetch a user profile in an Expo app with error handling and loading states.
```

### Set Up Query Caching

```
Help me set up React Query in an Expo Router app and add a user detail query with cache settings.
```

### Design Authenticated Fetching

```
Design an authenticated fetch wrapper for an Expo app that stores tokens in SecureStore and refreshes expired tokens.
```

### Audit a Networking Layer

```
Audit this Expo networking layer for caching, retries, offline behavior, request cancellation, and environment configuration. Suggest prioritized changes.
```

## Limitations

- It provides guidance and snippets; it does not run network requests by itself.
- It does not validate API schemas, authentication providers, or backend behavior.
- It does not replace security review for production token refresh flows.
- Examples use placeholder URLs and must be adapted to each app.

## Best Practices

- Keep API base URLs in Expo public environment variables only when they are safe for client bundles.
- Use SecureStore for authentication tokens and avoid AsyncStorage for sensitive values.
- Handle failed HTTP status codes before parsing success data.

## Anti Patterns

- Do not place write-capable API keys or database passwords in EXPO\_PUBLIC variables.
- Do not assume fetch throws for non-2xx HTTP responses.
- Do not add retries without backoff, cancellation, and clear user feedback.

## Security Audit

- Audited at: 2026-07-06T14:27:03.343\+00:00
- Summary: All static findings appear to be false positives caused by Markdown fences, TypeScript template literals, placeholder fetch calls, and Expo environment-variable examples in SKILL.md. The skill is documentation-only and includes advice to avoid putting secrets in EXPO\_PUBLIC variables. No semantic evidence of shell execution, secret collection, data exfiltration, or prompt injection was found.

## Stats

- Views: 194
- Downloads: 8
- Favorites: 1
- Popularity score: 0
