native-data-fetching

Handle network requests with retries, cancellation, and secure token storage for Expo React Native.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/json-choi/yogiya --skill native-data-fetching-json-choi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/json-choi/yogiya/tree/main/apps/mobile/.agents/skills/native-data-fetching
Command: npx skills add https://github.com/json-choi/yogiya --skill native-data-fetching-json-choi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes and standardizes network requests, error handling, caching, and offline behavior for Expo React Native apps so developers avoid fragile, insecure, or inconsistent API interactions.

Core Features & Use Cases

  • Fetch-first guidance for implementing GET/POST requests with robust response checks and JSON parsing.
  • State & caching integration with React Query (TanStack Query) for staleTime, retries, mutations, invalidation, and persistence.
  • Authentication & token management using secure storage and refresh flows, plus request cancellation and exponential backoff for reliability.
  • Use case: Build a user profile screen that securely fetches data, caches results for 5 minutes, retries transient failures, and resumes fetching when the device comes back online.

Quick Start

Use the authFetch wrapper together with React Query to request data from your EXPO_PUBLIC_API_URL while storing tokens in SecureStore and enabling offline-aware retries.

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 network requests and API calls in an Expo React Native app?

Use fetch-based wrappers with React Query to manage API calls, caching, and offline support in Expo React Native. This setup standardizes response checks, JSON parsing, and secure token storage to prevent inconsistent data fetching.

What is the best way to manage authentication tokens and secure storage for React Native fetch requests?

Manage authentication tokens for React Native fetch requests by using SecureStore to handle token storage and refresh flows. Centralizing this process ensures secure API interactions and reliable request execution.

How do I configure React Query default options for caching and offline support?

Configure React Query default options by setting staleTime, retries, and persistence to enable offline support. This integration manages state and caching, allowing data to be cached for specific durations and resuming fetches when back online.

Does this networking approach support exponential backoff retry logic and abortable requests?

Yes, this networking approach supports exponential backoff retry logic and abortable requests. It handles transient failures by retrying requests with exponential backoff and allows request cancellation to prevent hanging operations.

How do I set up environment-based API configuration for Expo applications?

Set up environment-based API configuration for Expo applications by using the EXPO_PUBLIC_API_URL variable. This configuration allows the fetch client to dynamically target the correct API endpoint based on the current environment.

Why does my React Native fetch request fail when the device goes offline?

React Native fetch requests fail offline because standard fetching lacks network state awareness. Implementing offline-aware retries and caching with React Query persistence allows the app to resume fetching and display cached data when back online.