native-data-fetching

Implement and debug network requests and data fetching in React Native and Expo projects.

2|Updated Aug 26, 2023
One-click install
npx skills add https://github.com/VaggelisKa/subscriptions-manager --skill native-data-fetching-vaggeliska
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/VaggelisKa/subscriptions-manager/tree/main/.agents/skills/native-data-fetching
Command: npx skills add https://github.com/VaggelisKa/subscriptions-manager --skill native-data-fetching-vaggeliska

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers implement and debug network requests, API calls, and data fetching across React Native/Expo apps, with built-in patterns for error handling, caching, and offline support.

Core Features & Use Cases

  • Unified data-fetching patterns: fetch, axios, and modern tooling (React Query, SWR) with consistent error handling.
  • Caching and offline readiness: strategies to cache responses and work offline gracefully.
  • Real-world scenarios: from simple API calls to authenticated flows and environment-based config.

Quick Start

Wrap your API calls with the recommended fetch-based client and enable React Query for caching and automatic data updates.

Frequently Asked Questions about native-data-fetching

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

FAQPage Schema
How do I implement API calls and data fetching in React Native?

API calls and data fetching in React Native are implemented by wrapping requests with a fetch-based client and enabling React Query for caching, automatic data updates, and consistent error handling.

What's the best way to handle caching and offline fetches in Expo?

Caching and offline fetches in Expo are handled using built-in strategies to cache network responses and gracefully manage data retrieval when the device loses connectivity.

Does this data fetching approach work with React Query and SWR?

Yes, data fetching patterns support integration with modern tooling like React Query and SWR, providing unified caching, request cancellation, and robust error handling across your project.

How do I manage tokens and environment variables for network requests?

Token management and environment variables for network requests are managed through environment-based configuration, ensuring authenticated API flows have the correct credentials and endpoints.

Why does my fetch request fail without proper error handling?

Fetch requests fail without error handling because network interruptions or invalid responses are unmanaged; implementing robust error handling patterns ensures failures are caught and resolved gracefully.

Can I cancel ongoing API calls in a React Native application?

Yes, ongoing API calls in a React Native application can be canceled using built-in request cancellation patterns, preventing unnecessary network traffic and state updates when components unmount.