From: coderwhy Date: Sat, 23 Jul 2022 13:36:13 +0000 (+0800) Subject: docs: update description X-Git-Tag: @pinia/nuxt@0.3.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f7d145c388345308d750c74dd5461bb96e8157f;p=thirdparty%2Fvuejs%2Fpinia.git docs: update description --- 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 }