Skip to content

Update state-management.md #2 #2488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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