native-data-fetching
建置 Expo 網路流程
行動 App 需要可靠的 API 請求、快取、權杖處理與離線行為。此技能會引導 Expo 開發者使用 fetch、React Query、SecureStore、NetInfo,以及基於環境的設定。
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "native-data-fetching" from https://skillstore.io/skills/expo-native-data-fetching.md and its manifest at https://skillstore.io/api/skills/expo-native-data-fetching/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「native-data-fetching」。 為使用者個人資料畫面建立 fetch 模式。
預期結果:
- 建議的請求流程,包含載入、錯誤與成功狀態。
- 在解析資料前進行回應狀態檢查。
- 替換 placeholder API URL 的注意事項。
正在使用「native-data-fetching」。 規劃開發與生產環境的 API 設定。
預期結果:
一份精簡的環境規劃,使用公開用戶端 URL、分開的開發與生產值,並提醒將機密保留在伺服器端。
正在使用「native-data-fetching」。 偵錯不穩定的行動 API 呼叫。
預期結果:
一份疑難排解檢查清單,涵蓋連線能力、HTTP 狀態處理、重試時機、快取過期與請求取消。
安全審計
安全All static findings appear to be false positives caused by Markdown fences, TypeScript template literals, placeholder fetch calls, and Expo environment-variable examples in SKILL.md. The skill is documentation-only and includes advice to avoid putting secrets in EXPO_PUBLIC variables. No semantic evidence of shell execution, secret collection, data exfiltration, or prompt injection was found.
風險因素
⚙️ 外部命令 (58)
🌐 網路存取 (17)
🔑 環境變數 (4)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/expo-native-data-fetching/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/expo-native-data-fetching?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/expo-native-data-fetching?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/expo-native-data-fetching/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/expo-native-data-fetching.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
expo. (2026). native-data-fetching security audit report (audit version 5) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/expo-native-data-fetching/audits/5BibTeX 引用
@techreport{expo-expo-native-data-fetching-2026,
author = {expo},
title = {native-data-fetching security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/expo-native-data-fetching/audits/5},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "native-data-fetching security audit report (audit version 5)"
version: "1.0.0"
type: report
authors:
- name: "expo"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/expo-native-data-fetching/audits/5"
identifiers:
- type: other
value: "skillstore:expo-native-data-fetching:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 高你可以打造什麼
交付可靠的 API 呼叫
Expo 開發者可以為新的行動功能加入 fetch 包裝器、狀態檢查與型別化錯誤。
選擇快取策略
技術負責人可以比較簡單 fetch 模式與 React Query 在共享伺服器狀態上的使用方式。
準備離線驗證
產品工程師可以結合 SecureStore、NetInfo 與重試行為,打造支援驗證且具離線能力的畫面。
試試這些提示
示範如何在 Expo app 中 fetch 使用者個人資料,並包含錯誤處理與載入狀態。
協助我在 Expo Router app 中設定 React Query,並加入具有快取設定的使用者詳細資料查詢。
為 Expo app 設計已驗證的 fetch wrapper,將權杖儲存在 SecureStore,並重新整理過期權杖。
稽核這個 Expo networking layer 的快取、重試、離線行為、請求取消與環境設定。建議依優先順序排列的變更。
最佳實務
- 只有在 API base URL 對用戶端 bundle 安全時,才將其放在 Expo 公開環境變數中。
- 使用 SecureStore 儲存驗證權杖,並避免將 AsyncStorage 用於敏感值。
- 在解析成功資料前,先處理失敗的 HTTP 狀態碼。
避免
- 不要將具有寫入能力的 API 金鑰或資料庫密碼放在 EXPO_PUBLIC 變數中。
- 不要假設 fetch 會因非 2xx HTTP 回應而拋出錯誤。
- 不要在沒有 backoff、取消機制與清楚使用者回饋的情況下加入重試。