Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 840afeb

Browse files
authored
make statement more clearly (#32)
* make statement more clearly It seems like the latter sentence has nothing to do with the previous sentence, thus they probably shouldn't be in the same paragraph. * sync with English version
1 parent 0a6a723 commit 840afeb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ watchEffect(onInvalidate => {
392392
})
393393
```
394394

395-
We are registering the invalidation callback via a passed-in function instead of returning it from the callback (like React `useEffect`) because the return value is important for async error handling. It is very common for the effect function to be an async function when performing data fetching:
395+
We are registering the invalidation callback via a passed-in function instead of returning it from the callback (like React `useEffect`) because the return value is important for async error handling.
396+
397+
It is very common for the effect function to be an async function when performing data fetching:
396398

397399
```js
398400
const data = ref(null)

zh/api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,9 @@ watchEffect((onInvalidate) => {
393393
})
394394
```
395395

396-
我们之所以是通过传入一个函数去注册失效回调,而不是从回调返回它(如 React `useEffect` 中的方式),是因为返回值对于异步错误处理很重要。在执行数据请求时,副作用函数往往是一个异步函数:
396+
我们之所以是通过传入一个函数去注册失效回调,而不是从回调返回它(如 React `useEffect` 中的方式),是因为返回值对于异步错误处理很重要。
397+
398+
在执行数据请求时,副作用函数往往是一个异步函数:
397399

398400
```js
399401
const data = ref(null)

0 commit comments

Comments
 (0)