Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Commit 113cc26

Browse files
Yukon123wxsmsJinjiang
authored
docs: Update refs-api.md (#673)
* Update refs-api.md * Update src/api/refs-api.md Co-authored-by: wxsm <wxsms@foxmail.com> * Update src/api/refs-api.md Co-authored-by: wxsm <wxsms@foxmail.com> * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: wxsm <wxsms@foxmail.com> Co-authored-by: Jinjiang <zhaojinjiang@me.com>
1 parent ef2569d commit 113cc26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/refs-api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ stateAsRefs.foo.value++
114114
console.log(state.foo) // 3
115115
```
116116

117-
当从组合式函数返回响应式对象时,`toRefs` 非常有用,这样消费组件就可以在不丢失响应性的情况下对返回的对象进行分解/扩散
117+
当从组合式函数返回响应式对象时,`toRefs` 非常有用,这样消费组件就可以在不丢失响应性的情况下对返回的对象进行解构/展开
118118

119119
```js
120120
function useFeatureX() {
@@ -217,7 +217,7 @@ isReactive(foo.value) // false
217217

218218
## `triggerRef`
219219

220-
手动执行与 [`shallowRef`](#shallowref) 关联的任何副作用
220+
手动执行与 [`shallowRef`](#shallowref) 关联的任何作用 (effect)
221221

222222
```js
223223
const shallow = shallowRef({
@@ -229,7 +229,7 @@ watchEffect(() => {
229229
console.log(shallow.value.greet)
230230
})
231231
232-
// 这不会触发副作用,因为 ref 是浅层的
232+
// 这不会触发作用 (effect),因为 ref 是浅层的
233233
shallow.value.greet = 'Hello, universe'
234234
235235
// 记录 "Hello, universe"

0 commit comments

Comments
 (0)