data-fetching

Standardize network requests and API calls with fetch, axios, React Query, or SWR.

3.4k|522|Updated Apr 7, 2025
One-click install
npx skills add https://github.com/Intelligent-Internet/ii-agent --skill data-fetching-intelligent-internet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-fetching
Source: https://github.com/Intelligent-Internet/ii-agent/tree/main/src/ii_agent/settings/skills/builtin/expo-data-fetching
Command: npx skills add https://github.com/Intelligent-Internet/ii-agent --skill data-fetching-intelligent-internet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured approach to implementing, debugging, and optimizing network requests, API calls, and data fetching across modern apps, ensuring reliability and performance.

Core Features & Use Cases

  • Support for fetch, axios, React Query, SWR, and caching strategies
  • Comprehensive error handling, offline support, and token management
  • Use cases include API integration, data synchronization, and routing data for offline-first apps

Quick Start

Instruct the AI to configure and validate a robust network layer for your app in seconds.

Frequently Asked Questions about data-fetching

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

FAQPage Schema
What is the best way to manage API calls and caching in React?

The best way to manage API calls in React is by standardizing data fetching with React Query or SWR. These tools provide caching strategies, offline support, and structured error handling to optimize network requests and synchronization.

Does this approach support token management and environment variables for network requests?

Yes, you can use fetch for offline-first app data synchronization by applying patterns for offline support and data routing. This ensures your app manages network requests effectively and maintains data availability without a constant connection.

How do I configure a network layer for axios with token management?

Configuring a network layer for axios with token management involves enforcing patterns for token handling and environment variables. This standardizes API integration and secures network requests across your application's environment.

Why does SWR caching fail when handling API fetching errors?

SWR caching may fail during API fetching errors if the network layer lacks comprehensive error handling and retry patterns with backoff. Implementing structured token management and offline support ensures data synchronization and request reliability.