Skip to main content
在 Manus 中运行任何 Skill
一键导入

react-query

星标90
分支13
更新时间2026年7月12日 15:49

TanStack Query v5 服务端状态管理规范 / TanStack Query v5 Enterprise Patterns. 定义服务端数据请求全流程标准:QueryClient 配置(staleTime/gcTime/retry)、Query Key Factory 查询键工厂(禁止裸字符串)、queryOptions 共享查询配置、useQuery 数据获取、useMutation 变更操作与乐观更新 optimistic update、错误边界 error boundary 集成、预取 prefetch、无限滚动 useInfiniteQuery、防重复请求。 服务端状态属于 TanStack Query — 永远不要放入 Redux store。 触发场景 / Trigger: 数据请求 data fetching server state API request network call HTTP fetch axios, API 调用 API call endpoint integration request response REST GraphQL, TanStack Query react-query v5 useQuery useMutation useInfiniteQuery useSuspenseQuery, useQuery query key data isLoading isError isFetching isPending status error refetch, useMutation mutate mutateAsync onSuccess onError onSettled onMutate optimistic update rollback, 乐观更新 optimistic update immediate UI feedback rollback on error cache invalidation, 缓存 cache staleTime gcTime cacheTime garbage collection time refetchInterval refetchOnWindowFocus, staleTime stale data fresh data background refetch staleness window focus, 预取 p

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly