Skip to content

Commit ec75afe

Browse files
authored
Add mention about reactive() and Vue 3
In version 3.0 you can create a reactive object with the reactive() API. ```javascript const reactiveState = reactive({ count: 0 }) ```
1 parent 373c44f commit ec75afe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4202,7 +4202,13 @@ List of 300 VueJS Interview Questions
42024202
**[⬆ Back to Top](#table-of-contents)**
42034203
42044204
197. ### How do you create reactive objects?
4205-
From 2.6 version onwards, you can create reactive objects with Vue.observable() global API.
4205+
In version 3.0 you can create a reactive object with the reactive() API.
4206+
```javascript
4207+
const reactiveState = reactive({
4208+
count: 0
4209+
})
4210+
```
4211+
In version 2.6, you can create reactive objects with Vue.observable() global API.
42064212
```javascript
42074213
const reactiveState = Vue.observable({
42084214
count: 0

0 commit comments

Comments
 (0)