注: 带 * 的文件表示待检查状态
- packages/query-core/src/index.ts - 核心功能入口文件
- packages/query-core/src/queryClient.ts - 查询客户端实现
- packages/query-core/src/queryCache.ts - 缓存系统实现
- packages/query-core/src/mutationCache.ts - 数据变更缓存实现
- packages/query-core/src/notifyManager.ts - 通知管理器
- packages/query-core/src/query.ts - 查询核心实现
- packages/query-core/src/retryer.ts - 重试机制实现
- packages/query-core/src/focusManager.ts - 焦点管理器
- packages/query-core/src/onlineManager.ts - 在线状态管理器
- packages/query-core/src/subscribable.ts - 订阅基础类
- packages/react-query/src/index.ts - React 绑定入口
- packages/react-query/src/QueryClientProvider.tsx - React Context 提供者
- packages/react-query/src/useQuery.ts - 核心查询 Hook
- packages/query-persist-client-core/src/index.ts - 持久化核心
- packages/query-sync-storage-persister/src/index.ts - 同步存储持久化
- packages/query-async-storage-persister/src/index.ts - 异步存储持久化
- packages/query-devtools/src/index.tsx * - 开发者工具
- packages/react-query-devtools/src/index.ts - React 开发者工具
- packages/eslint-plugin-query/src/index.ts - ESLint 插件
- packages/solid-query/src/index.ts - SolidJS 集成
- packages/vue-query/src/index.ts - Vue 集成
- packages/svelte-query/src/index.ts - Svelte 集成
- packages/query-broadcast-client-experimental/src/index.ts * - 实验性广播功能
- packages/react-query-next-experimental/src/index.ts - Next.js 实验性集成
Hooks for fetching, caching and updating asynchronous data in React, Solid, Svelte and Vue
Enjoy this library? Try the entire TanStack! TanStack Table, TanStack Router, TanStack Virtual, React Charts, React Ranger
Visit tanstack.com/query for docs, guides, API and more
Still on React Query v2? No problem! Check out the v2 docs here: https://github.com/TanStack/query/tree/2.x/docs/src/pages/docs.
Still on React Query v3? No problem! Check out the v3 docs here: https://tanstack.com/query/v3/docs/.
Still on React Query v4? No problem! Check out the v4 docs here: https://tanstack.com/query/v4/docs/.
- Transport/protocol/backend agnostic data fetching (REST, GraphQL, promises, whatever!)
- Auto Caching + Refetching (stale-while-revalidate, Window Refocus, Polling/Realtime)
- Parallel + Dependent Queries
- Mutations + Reactive Query Refetching
- Multi-layer Cache + Automatic Garbage Collection
- Paginated + Cursor-based Queries
- Load-More + Infinite Scroll Queries w/ Scroll Recovery
- Request Cancellation
- React Suspense + Fetch-As-You-Render Query Prefetching
- Dedicated Devtools
View the contributing guidelines here

