Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)48k · #5280

native-data-fetching

Skill này làm gì

Công cụ này giúp kết nối ứng dụng của bạn với internet để lấy hoặc gửi thông tin. Nó bao gồm từ những kiến thức cơ bản về gửi yêu cầu đến việc xử lý sự cố mạng và lưu dữ liệu để dùng khi ngoại tuyến.

Khi nào nên dùng

  • ✓Khi bạn cần lấy dữ liệu từ một website hoặc dịch vụ.
  • ✓Khi ứng dụng của bạn cần hoạt động ngay cả khi không có internet.
  • ✓Khi cần sửa lỗi dữ liệu không tải đúng cách.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/native-data-fetching/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/native-data-fetching/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để lấy dữ liệu từ API trong ứng dụng của tôi?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ hướng dẫn bạn cách tốt nhất để gửi yêu cầu mạng, cách dùng các thư viện phổ biến để lấy dữ liệu và cách cấu hình ứng dụng để hoạt động tốt trong nhiều điều kiện mạng khác nhau.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Expo Networking

You MUST use this skill for ANY networking work including API requests, data fetching, caching, or network debugging.

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use

Use this skill when:

  • Implementing API requests
  • Setting up data fetching (React Query, SWR)
  • Using Expo Router data loaders (useLoaderData, web SDK 55+)
  • Debugging network failures
  • Implementing caching strategies
  • Handling offline scenarios
  • Authentication/token management
  • Configuring API URLs and environment variables

Example Invocations

User: "How do I make API calls in React Native?" -> Use fetch, wrap with error handling

User: "Should I use React Query or SWR?" -> React Query for complex apps, SWR for simpler needs

User: "My app needs to work offline" -> Use NetInfo for status, React Query persistence for caching

User: "How do I handle authentication tokens?" -> Store in expo-secure-store, implement refresh flow

User: "API calls are slow" -> Check caching strategy, use React Query staleTime User: "How do I configure different API URLs for dev and prod?" -> Use EXPOPUBLIC env vars with .env.development and .env.production files User: "Where should I put my API key?" -> Client-safe keys: EXPOPUBLIC in .env. Secret keys: non-prefixed env vars in API routes only

User: "How do I load data for a page in Expo Router?" -> See references/expo-router-loaders.md for route-level loaders (web, SDK 55+). For native, use React Query or fetch.

Limitations

  • Use this skill only when the task clearly matches its upstream product or API scope.
  • Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
  • Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Câu hỏi thường gặp

Yêu cầu API là gì?

Đó giống như các yêu cầu mà ứng dụng của bạn gửi đến dịch vụ khác trên internet để lấy hoặc gửi thông tin.

Vì sao cần xử lý lỗi mạng?

Để ứng dụng không bị treo hoặc hiển thị thông báo khó hiểu khi kết nối thất bại, mang lại trải nghiệm tốt hơn cho người dùng.

Caching là gì?

Đó là lưu tạm thông tin đã lấy để ứng dụng truy cập nhanh hơn ở lần sau, không cần tải lại từ internet.

Chi tiết

Mô tả gốc của tác giả

Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (`useLoaderData`).

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5280
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự