You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explicitly creates a reactive object. This is what Vue performs internally on objects returned from a component's `data()` function.
415
+
416
+
The returned object can be used directly inside [render functions](../guide/render-function.html) and [computed properties](../guide/computed.html), and will trigger appropriate updates when mutated. It can be used as a minimal cross-component state store for simple scenarios.
417
+
418
+
```js
419
+
constobj=Vue.observable({ count:0 })
420
+
421
+
constDemo= {
422
+
render(h) {
423
+
returnh('button', {
424
+
on: { click: () => { obj.count++ }}
425
+
}, `count is: ${obj.count}`)
426
+
}
427
+
}
428
+
```
429
+
430
+
-**See also:**[Reactivity in Depth](../guide/reactivity.html)
431
+
405
432
### Vue.version
406
433
407
434
-**Details**: Provides the installed version of Vue as a string. This is especially useful for community plugins and components, where you might use different strategies for different versions.
0 commit comments