]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: update description
authorcoderwhy <coderwhy@gmail.com>
Sat, 23 Jul 2022 13:36:13 +0000 (21:36 +0800)
committerEduardo San Martin Morote <posva13@gmail.com>
Sun, 24 Jul 2022 16:15:53 +0000 (18:15 +0200)
packages/docs/core-concepts/state.md

index 39e832ac38efecc9a8e7ced39181f0a86c5db72b..9733686134e5f27da80ce4984c11c305673fa801 100644 (file)
@@ -192,9 +192,9 @@ cartStore.$patch((state) => {
 
 The main difference here is that `$patch()` allows you to group multiple changes into one single entry in the devtools. Note **both, direct changes to `state` and `$patch()` appear in the devtools** and can be time traveled (not yet in Vue 3).
 
-## Replacing the `state`
+## Merging the `state`
 
-You can replace the whole state of a store by setting its `$state` property to a new object:
+You can merge a new object into a state of store by setting its `$state` property:
 
 ```js
 store.$state = { counter: 24 }