]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: change `data` with `state` (#2980)
authorLeo <3853621+leoelz@users.noreply.github.com>
Tue, 13 May 2025 17:01:06 +0000 (14:01 -0300)
committerGitHub <noreply@github.com>
Tue, 13 May 2025 17:01:06 +0000 (19:01 +0200)
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.

packages/docs/core-concepts/state.md

index 4121de0e4d535d3278e9373c562374e311e607ad..64bbae7a769662567df1ed06a39d2a2bff0f773c 100644 (file)
@@ -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`.
 
 :::