From 5f7d145c388345308d750c74dd5461bb96e8157f Mon Sep 17 00:00:00 2001 From: coderwhy Date: Sat, 23 Jul 2022 21:36:13 +0800 Subject: [PATCH] docs: update description --- packages/docs/core-concepts/state.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docs/core-concepts/state.md b/packages/docs/core-concepts/state.md index 39e832ac..97336861 100644 --- a/packages/docs/core-concepts/state.md +++ b/packages/docs/core-concepts/state.md @@ -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 } -- 2.47.2