native-data-fetching

Configure fetch-based API clients with retries, caching, and token refresh for Expo apps.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/mjamore/ticked-off --skill native-data-fetching-mjamore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/mjamore/ticked-off/tree/main/.agents/skills/native-data-fetching
Command: npx skills add https://github.com/mjamore/ticked-off --skill native-data-fetching-mjamore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses unreliable or inconsistent network implementations in Expo and React Native apps by providing clear patterns for making API requests, handling errors, managing authentication tokens, caching, and supporting offline scenarios so apps remain robust and debuggable.

Core Features & Use Cases

  • Fetch-first guidance: prefer the built-in fetch API for deterministic requests and avoid unnecessary axios usage.
  • Stateful caching and synchronization: ready patterns for React Query setup, queries, mutations, staleTime tuning, and invalidation flows.
  • Resilient error handling and retries: typed API errors, retry with exponential backoff, and request cancellation strategies.
  • Authentication and token lifecycle: secure token storage with expo-secure-store, token refresh coordination, and authenticated fetch wrappers.
  • Offline support and environment config: network status detection with NetInfo, React Query onlineManager integration, and environment-specific API host configuration using EXPO_PUBLIC_ variables.
  • Use Case: implement a production API client for an Expo app that needs authenticated requests, robust retry/backoff, and offline-aware caching.

Quick Start

Use the native-data-fetching skill to implement a fetch-based API client with error handling, retry logic, secure token storage, and React Query integration for your Expo app.

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 API data fetching and caching in Expo React Native?

API data fetching and caching in Expo React Native can be handled using the built-in fetch API combined with React Query. This provides stateful synchronization, staleTime tuning, and query invalidation for robust client-side data flows.

What's the best way to store and refresh authentication tokens in React Native?

Storing and refreshing authentication tokens in React Native is best handled using expo-secure-store. It enables secure token persistence and allows you to build authenticated fetch wrappers with coordinated token refresh logic.

How do I implement retry logic with exponential backoff for fetch requests?

Retry logic with exponential backoff for fetch requests ensures resilient networking by reattempting failed API calls. This approach includes typed API errors and request cancellation strategies to maintain deterministic network behavior.

Does React Query work with NetInfo for offline support in Expo apps?

React Query works with NetInfo for offline support in Expo apps by integrating the onlineManager. This detects network status changes, allowing you to manage offline-aware caching and keep apps robust when connectivity drops.

Do I need axios for networking in React Native or is fetch enough?

You do not need axios for networking in React Native; the built-in fetch API is sufficient. Preferring fetch-first guidance avoids unnecessary dependencies and ensures deterministic requests with comprehensive error handling.

How do I configure environment-specific API hosts in an Expo app?

Configuring environment-specific API hosts in an Expo app uses EXPO_PUBLIC_ variables. This environment-based configuration directs your fetch-based API client to the correct backend host for each deployment target.