Skip to content

Commit

Permalink
Update state-management.md #2 (vuejs#2488)
Browse files Browse the repository at this point in the history
use `var` consistently. previous PR was using `const`, it should be using `var`. ref: vuejs#2486 (comment)
  • Loading branch information
adamwirth authored Feb 19, 2020
1 parent 2f48dc1 commit fd246eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/v2/guide/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ If you're coming from React, you may be wondering how vuex compares to [redux](h
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:

``` js
const sourceOfTruth = {}
var sourceOfTruth = {}

const vmA = new Vue({
var vmA = new Vue({
data: sourceOfTruth
})

const vmB = new Vue({
var vmB = new Vue({
data: sourceOfTruth
})
```
Expand Down

0 comments on commit fd246eb

Please sign in to comment.