Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(useRequest): 官方文档useRequest hooks文案错误,v2中的option参数应该是throwOnError #2563

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading