8000 docs: added limitation documentation of using reactive · aztalbot/vue-function-api@bb1e030 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb1e030

Browse files
pikaxliximomo
authored andcommitted
docs: added limitation documentation of using reactive
1 parent bacf216 commit bb1e030

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ b.list.push(
167167
b.list[1].count === 1; // true
168168
```
169169

170+
### ***Using*** `reactive` will mutate the origin object
171+
172+
This is an limitation of using `Vue.observable` in Vue 2.
173+
> Vue 3 will return an new proxy object.
174+
170175
---
171176

172177
## `watch()` API

README.zh-CN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ b.list.push(
167167
b.list[1].count === 1; // true
168168
```
169169

170+
### `reactive` 会返回一个修改过的原始的对象
171+
172+
此行为与 Vue 2 中的 `Vue.observable` 一致
173+
> Vue 3 中会返回一个新的的代理对象.
174+
170175
---
171176

172177
## `watch()` API

0 commit comments

Comments
 (0)
0