From: Leo <3853621+leoelz@users.noreply.github.com> Date: Tue, 13 May 2025 17:01:06 +0000 (-0300) Subject: docs: change `data` with `state` (#2980) X-Git-Tag: @pinia/nuxt@0.11.1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ec622d30131672a7cf5a752e0e8784181ae9aa0;p=thirdparty%2Fvuejs%2Fpinia.git docs: change `data` with `state` (#2980) Every piece in the object that returns `state` is what must be declared. Even though we can think of `state` *as* the `data` of the store, but I believe that is confussing to use both terms indistinctly. --- diff --git a/packages/docs/core-concepts/state.md b/packages/docs/core-concepts/state.md index 4121de0e..64bbae7a 100644 --- a/packages/docs/core-concepts/state.md +++ b/packages/docs/core-concepts/state.md @@ -32,7 +32,7 @@ export const useStore = defineStore('storeId', { :::tip -In order for Vue to properly detect state, you must declare every state piece in `data`, even if its initial value is `undefined`. +In order for Vue to properly detect state, you must declare every state piece in `state`, even if its initial value is `undefined`. :::