Skip to content

Commit a52268d

Browse files
committed
note about _/$
1 parent 2c88b71 commit a52268d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/api/options.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ data.a = 3
3030
vm.a // -> 3
3131
```
3232

33+
Note that properties that start with `_` or `$` will not be proxied on the Vue instance because they may conflict with Vue's internal properties and API methods. You will have to access them as `vm.$data._property`.
34+
3335
The object must be JSON-compliant (no circular references). You can use it just like an ordinary object, and it will look exactly the same when serialized with `JSON.stringify`. You can also share it between multiple Vue instances.
3436

3537
A special case here is when using the `data` option in `Vue.extend()`. Since we don't want nested objects to be shared by all instances created from that extended constructor, we must provide a function that returns a fresh copy of the default data:
@@ -47,7 +49,7 @@ var MyComponent = Vue.extend({
4749
})
4850
```
4951

50-
<p class="tip">Under the hood, Vue.js attaches a hidden property `__ob__` and recursively converts the object's enumerable properties into getters and setters to enable dependency collection. Properties with keys that starts with `$` or `_` are skipped.</p>
52+
<p class="tip">Under the hood, Vue.js attaches a hidden property `__ob__` and recursively converts the object's enumerable properties into getters and setters to enable dependency collection.</p>
5153

5254
### props
5355

0 commit comments

Comments
 (0)