]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: extra clarification on why private state isn't allowed (#2507)
authorGunnar Oledal <gunnar.oledal@gmail.com>
Tue, 28 Nov 2023 14:07:10 +0000 (15:07 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 14:07:10 +0000 (15:07 +0100)
* Some extra clarification on why private state isn't allowed

* Update packages/docs/core-concepts/index.md

---------

Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
packages/docs/core-concepts/index.md

index 64396e8a00cdae339fd245ae3788cddeb698cbd7..b74d93e5ff00b8f8e2cfa37c2625034465d64427 100644 (file)
@@ -68,7 +68,7 @@ In _Setup Stores_:
 - `computed()`s become `getters`
 - `function()`s become `actions`
 
-Note you **must** return **all state properties** in setup stores for pinia to pick them up as state. In other words, you cannot have _private_ state properties in stores.
+Note you **must** return **all state properties** in setup stores for pinia to pick them up as state. In other words, you cannot have _private_ state properties in stores. Not returning all state properties can break SSR, devtools, and other plugins.
 
 Setup stores bring a lot more flexibility than [Option Stores](#option-stores) as you can create watchers within a store and freely use any [composable](https://vuejs.org/guide/reusability/composables.html#composables). However, keep in mind that using composables will get more complex when using [SSR](../cookbook/composables.md).