Skip to content

Commit

Permalink
docs: Update the contributing.md url
Browse files Browse the repository at this point in the history
Update react-query's description
  • Loading branch information
guoshuangyang committed Jan 14, 2025
1 parent b2a4220 commit b37ca37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Umi Contributing Guide

Checkout [docs/docs/introduce/contributing.md](docs/docs/introduce/contributing.md) for the full guide.
Checkout [docs/docs/docs/introduce/contributing.md](docs/docs/docs/introduce/contributing.md) for the full guide.
5 changes: 4 additions & 1 deletion docs/docs/docs/max/react-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ export const reactQuery: RuntimeReactQueryType = {
queries: {
// 🟡 此配置具有的表现往往令人出乎意料,若无特殊需求,请默认关闭
refetchOnWindowFocus: false,
// 🟡 如果是 v4 版本react-query,networkMode 推荐设置为 'always'
networkMode: 'always',
},
},
},
};
```

注:绝大多数项目中,**你都应该默认设定 `refetchOnWindowFocus: false`** ,否则将引发出人意料的反复获取数据效果(这在 SWR 中被称为 [`revalidateOnFocus`](https://swr.vercel.app/zh-CN/docs/api#options) )。
注:绝大多数项目中,**你都应该默认设定 `refetchOnWindowFocus: false`** ,否则将引发出人意料的反复获取数据效果(这在 SWR 中被称为 [`revalidateOnFocus`](https://swr.vercel.app/zh-CN/docs/api#options) )。如果没有手动安装 v5 版本的 `@tanstack/react-query` 依赖,那么默认使用的是 v4 版本,**如无特殊需求建议设置 `networkMode: 'always'`** ,否则将引发出人意料的效果,详见[issue](https://github.com/TanStack/query/issues/5679)

0 comments on commit b37ca37

Please sign in to comment.