From ed672e3f28168a38027a2c402ea572be323af222 Mon Sep 17 00:00:00 2001 From: Adam Wirth Date: Wed, 19 Feb 2020 13:03:00 -0500 Subject: [PATCH] Update state-management.md use `var` consistently. previous PR was using `const`, it should be using `var`. ref: https://github.com/vuejs/vuejs.org/pull/2486#issuecomment-588314467 --- src/v2/guide/state-management.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/v2/guide/state-management.md b/src/v2/guide/state-management.md index 2e183c0f99..e00691d1a2 100644 --- a/src/v2/guide/state-management.md +++ b/src/v2/guide/state-management.md @@ -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 }) ```