Skip to content

Commit 071dc5c

Browse files
committed
docs: update error rollback title
1 parent c3e3c2d commit 071dc5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/hooks/src/useRequest/docs/basic/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ In the following example, we demonstrate a scenario of `mutate`.
113113

114114
We have modified the user name, but we do not want to wait for the request to be successful before giving feedback to the user. Instead, modify the data directly, then call the modify request in background, and provide additional feedback after the request returns.
115115

116-
### error rollback
116+
### error rollback `1.7.7.alpha.4`
117117

118118
When you use `mutate`, it is possible that the remote data change fails after the optimistic data is displayed to the user. In this case, you can enable `rollbackOnError`, which restores the local cache to its previous state, ensuring that the user sees Got the correct data.
119119

packages/hooks/src/useRequest/docs/basic/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ runAsync()
110110

111111
我们修改了用户名,但是我们不希望等编辑接口调用成功之后,才给用户反馈。而是直接修改页面数据,同时在背后去调用修改接口,等修改接口返回之后,另外提供反馈。
112112

113-
### 错误回滚
113+
### 错误回滚 `1.7.7.alpha.4`
114114

115115
当你使用 `mutate`时,有可能在乐观数据展示给用户后,远程数据更改却失败了。在这种情况下,你可以启用 `rollbackOnError`,将本地缓存恢复到之前的状态,确保用户看到的是正确的数据。
116116

0 commit comments

Comments
 (0)