Skip to content

Commit ccf108b

Browse files
mitaryyx990803
authored andcommitted
Make it clearer that sharing by identity is what you should be doing. (#282)
1 parent c6d94d2 commit ccf108b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/application.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ All Vue instances can have their raw `$data` directly serialized with `JSON.stri
7272

7373
## State Management
7474

75-
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:
75+
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:
7676

7777
``` js
7878
var sourceOfTruth = {}

0 commit comments

Comments
 (0)