data-fetching

Standardize API calls and network error handling across React and React Native applications.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/Selfdb-io/StreamX --skill data-fetching-selfdb-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-fetching
Source: https://github.com/Selfdb-io/StreamX/tree/main/.agentone/skills/expo-app-design/skills/data-fetching
Command: npx skills add https://github.com/Selfdb-io/StreamX --skill data-fetching-selfdb-io

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes API calls, data fetching, and network error handling across React and React Native applications, reducing boilerplate and preventing inconsistent patterns.

Core Features & Use Cases

  • Unified data-fetching patterns: Guidance for fetch, axios, React Query, and SWR to ensure consistency.
  • Error handling & offline support: Strategies for robust error reporting, retries, and caching to work offline when possible.
  • Use Case: Implement a user data fetch flow that handles loading, error states, caching, and automatic retries across web and mobile clients.

Quick Start

Configure a simple API client using fetch, wire it to React Query, and implement a sample data fetch with basic error handling and retry logic.

Frequently Asked Questions about data-fetching

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

FAQPage Schema
What's the best way to standardize API calls and data fetching in React and React Native?

To standardize API calls across React and React Native, use unified patterns with fetch, axios, React Query, or SWR to reduce boilerplate and prevent inconsistent network error handling across your applications.

How do I handle network errors and retries when fetching data in React?

Handling network errors and retries in React involves implementing standardized strategies for robust error reporting, caching, and automatic retry logic to ensure reliable data flow even under poor network conditions.

How do I manage authentication tokens for API calls in React and React Native?

Managing authentication tokens for API calls in React and React Native requires secure token handling and environment-based configuration to maintain consistent and safe authorization across web and mobile clients.

Does this data-fetching approach support offline caching?

Yes, this data-fetching approach supports offline caching by implementing strategies that allow your React and React Native applications to work offline when possible, utilizing robust caching mechanisms for reliable data access.

React Query vs SWR: which should I use for data fetching?

React Query and SWR are both supported for unified data-fetching patterns; React Query is demonstrated for advanced usage with retry logic, while both ensure consistency and reduce boilerplate in your applications.

How do I configure a basic API client with fetch and React Query?

To configure a basic API client, you wire a simple fetch implementation to React Query, then implement a sample data fetch with basic error handling and retry logic to manage loading and error states.