Skip to content

Commit fd246eb

Browse files
authored
Update state-management.md #2 (vuejs#2488)
use `var` consistently. previous PR was using `const`, it should be using `var`. ref: vuejs#2486 (comment)
1 parent 2f48dc1 commit fd246eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/v2/guide/state-management.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ If you're coming from React, you may be wondering how vuex compares to [redux](h
1919
It is often overlooked that the source of truth in Vue applications is the raw `data` object - a Vue instance only proxies access to it. Therefore, if you have a piece of state that should be shared by multiple instances, you can share it by identity:
2020

2121
``` js
22-
const sourceOfTruth = {}
22+
var sourceOfTruth = {}
2323

24-
const vmA = new Vue({
24+
var vmA = new Vue({
2525
data: sourceOfTruth
2626
})
2727

28-
const vmB = new Vue({
28+
var vmB = new Vue({
2929
data: sourceOfTruth
3030
})
3131
```

0 commit comments

Comments
 (0)