Skip to content

Commit cf34af4

Browse files
author
Yan.Huang
committed
必须避免副作用 -> 应当尽量避免副作用
1 parent 6d2e0ec commit cf34af4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/zh-cn/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function checkout ({ dispatch, state }, products) {
4747
}
4848
```
4949

50-
请谨记一点,必须通过分发 mutations 来处理调用异步 API 的结果,而不是依赖返回值或者是传递回调来处理结果。基本原则就是:**Actions 除了分发 mutations 不能造成别的副作用**
50+
请谨记一点,必须通过分发 mutations 来处理调用异步 API 的结果,而不是依赖返回值或者是传递回调来处理结果。基本原则就是:**Actions 除了分发 mutations 应当尽量避免其他副作用**
5151

5252
### 在组件中调用 Actions
5353

0 commit comments

Comments
 (0)