Skip to content

Commit

Permalink
chore(userequest): useRequest hooks文案错误,v2中的option参数应该是throwOnError (#…
Browse files Browse the repository at this point in the history
…2563)

Co-authored-by: chovrio <chovrio@gmail.com>
  • Loading branch information
chovrio and chovrio authored Jun 12, 2024
1 parent a75a982 commit 11a71f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide/upgrade.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ useRequest has been rewritten:
- Removed `pagination` related options, it is recommended to use `usePagination` or `useAntdTable` to achieve paging ability.
- Removed `loadMore` related options, it is recommended to use `useInfiniteScroll` to achieve unlimited loading ability.
- Removed `fetchKey`, that is, deleted concurrent request.
- Removed `formatResult`, `initialData`, and `thrownError`.
- Removed `formatResult`, `initialData`, and `throwOnError`.
- The request library is no longer integrated by default, and `service` no longer supports string or object.
- Added `runAsync` and `refreshAsync`, the original `run` no longer returns Promise.
- Added error retry ability.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/upgrade.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ useRequest 完全进行了重写:
- 删除了 `pagination` 相关属性,建议使用 `usePagination``useAntdTable` 来实现分页能力。
- 删除了 `loadMore` 相关属性,建议使用 `useInfiniteScroll` 来实现无限加载能力。
- 删除了 `fetchKey`,也就是删除了并行能力。
- 删除了 `formatResult``initialData``thrownError`
- 删除了 `formatResult``initialData``throwOnError`
- 不再默认集成请求库,`service` 不再支持字符或对象。
- 新增了 `runAsync``refreshAsync`,原来的 `run` 不再返回 Promise。
- 新增了错误重试能力。
Expand Down

0 comments on commit 11a71f8

Please sign in to comment.