From 11a71f8db66af14cf1c5be69d64cc2c8ed43cb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=BE=E5=8F=81?= <92280658+chovrio@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:40:50 +0800 Subject: [PATCH] =?UTF-8?q?chore(userequest):=20useRequest=20hooks?= =?UTF-8?q?=E6=96=87=E6=A1=88=E9=94=99=E8=AF=AF=EF=BC=8Cv2=E4=B8=AD?= =?UTF-8?q?=E7=9A=84option=E5=8F=82=E6=95=B0=E5=BA=94=E8=AF=A5=E6=98=AFthr?= =?UTF-8?q?owOnError=20(#2563)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: chovrio --- docs/guide/upgrade.en-US.md | 2 +- docs/guide/upgrade.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/upgrade.en-US.md b/docs/guide/upgrade.en-US.md index 991704f02b..1cb2f30922 100644 --- a/docs/guide/upgrade.en-US.md +++ b/docs/guide/upgrade.en-US.md @@ -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. diff --git a/docs/guide/upgrade.zh-CN.md b/docs/guide/upgrade.zh-CN.md index ab37a65a0f..56234df363 100644 --- a/docs/guide/upgrade.zh-CN.md +++ b/docs/guide/upgrade.zh-CN.md @@ -36,7 +36,7 @@ useRequest 完全进行了重写: - 删除了 `pagination` 相关属性,建议使用 `usePagination` 或 `useAntdTable` 来实现分页能力。 - 删除了 `loadMore` 相关属性,建议使用 `useInfiniteScroll` 来实现无限加载能力。 - 删除了 `fetchKey`,也就是删除了并行能力。 -- 删除了 `formatResult`、`initialData`、`thrownError`。 +- 删除了 `formatResult`、`initialData`、`throwOnError`。 - 不再默认集成请求库,`service` 不再支持字符或对象。 - 新增了 `runAsync` 和 `refreshAsync`,原来的 `run` 不再返回 Promise。 - 新增了错误重试能力。