From ec9d06b336dcdb499314a3071cd70b8cf9859abe Mon Sep 17 00:00:00 2001 From: Mitar Date: Sat, 16 Apr 2016 22:54:05 -0700 Subject: [PATCH] Make it clearer that sharing by identity is what you should be doing. --- src/guide/application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/application.md b/src/guide/application.md index ae6d9d3dc7..786407b232 100644 --- a/src/guide/application.md +++ b/src/guide/application.md @@ -72,7 +72,7 @@ All Vue instances can have their raw `$data` directly serialized with `JSON.stri ## State Management -In large applications, state management often becomes complex due to multiple pieces of state scattered across many components and the interactions between them. It is often overlooked that the source of truth in Vue.js applications is the raw data object - a Vue instances simply proxies access to it. Therefore, if you have a piece of state that should be shared by multiple instances, you should avoid duplicating it and share it by identity: +In large applications, state management often becomes complex due to multiple pieces of state scattered across many components and the interactions between them. It is often overlooked that the source of truth in Vue.js applications is the raw data object - a Vue instances simply proxies access to it. Therefore, if you have a piece of state that should be shared by multiple instances, you should avoid duplicating it. Instead, share it by identity: ``` js var sourceOfTruth = {}