native-data-fetching

Configure Expo/React Native data fetching with caching, retries, and SecureStore.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/raphaelmans/agent-skills --skill native-data-fetching-raphaelmans
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/raphaelmans/agent-skills/tree/main/native-data-fetching
Command: npx skills add https://github.com/raphaelmans/agent-skills --skill native-data-fetching-raphaelmans

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Automatically stabilize and streamline data fetching and API communication in Expo/React Native projects, reducing flaky network calls and manual boilerplate.

Core Features & Use Cases

  • Basic fetch usage: Simple GET with proper error handling.
  • React Query integration: Data fetching with caching and invalidation.
  • Error handling & retries: Robust error parsing and exponential backoff.
  • Authentication: Token storage with expo-secure-store and token refresh flow.
  • Offline support: Network-aware requests and React Query offline mode.
  • Environment configuration: EXPO_PUBLIC_* vars for client configuration.

Quick Start

Fetch data from a given API endpoint with proper error handling, caching using React Query and offline support.

Frequently Asked Questions about native-data-fetching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle unreliable API calls and network errors in React Native?

To handle unreliable API calls in React Native, implement robust error parsing alongside retry strategies with exponential backoff. This approach stabilizes data fetching workflows by automatically recovering from transient network failures instead of crashing the application.

What is the best way to cache API data and support offline mode in Expo?

The best way to cache API data and support offline mode in Expo is by integrating React Query. It provides built-in data caching, query invalidation, and network-aware offline mode capabilities to ensure your application remains functional without an active internet connection.

How do I securely store authentication tokens for API calls in React Native?

Securely store authentication tokens for API calls in React Native using expo-secure-store. This ensures sensitive credentials are encrypted on the device, allowing you to safely manage token storage and execute authentication token refresh workflows.

Should I use axios or expo/fetch for data fetching in Expo projects?

You should use expo/fetch over axios for data fetching in Expo projects. Enforcing expo/fetch aligns with platform best practices, providing native networking optimizations and better integration with the React Native environment.

How do I configure environment variables for API endpoints in Expo?

Configure environment variables for API endpoints in Expo using EXPO_PUBLIC_* variables. This client configuration method allows you to expose public environment variables directly to your React Native application at build time.

Can I use React Query with expo-router data loaders?

Yes, you can use React Query with expo-router data loaders. This integration streamlines data fetching workflows by combining React Query's caching and invalidation capabilities with expo-router's routing structure for robust API communication.