Skip to content
Closed
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 @@ -35,7 +35,7 @@ Now whenever `sourceOfTruth` is mutated, both `vmA` and `vmB` will update their
To help solve this problem, we can adopt a **store pattern**:

``` js
var store = {
const store = {
debug: true,
state: {
message: 'Hello!'
Expand All @@ -56,14 +56,14 @@ Notice all actions that mutate the store's state are put inside the store itself
In addition, each instance/component can still own and manage its own private state:

``` js
var vmA = new Vue({
const vmA = new Vue({
data: {
privateState: {},
sharedState: store.state
}
})

var vmB = new Vue({
const vmB = new Vue({
data: {
privateState: {},
sharedState: store.state
Expand Down