]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: add hint on destructuring actions from store
authoristiyak <tailoristiyak303@gmail.com>
Wed, 9 Feb 2022 07:34:49 +0000 (13:04 +0530)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 18 Feb 2022 23:03:44 +0000 (00:03 +0100)
packages/docs/core-concepts/index.md

index 4eb3fcc0fd368af7ccf04fb1ef8d86cdfa450778..03230718de96eb5313abbb7713107a2f72385635 100644 (file)
@@ -88,3 +88,14 @@ export default defineComponent({
   },
 })
 ```
+
+:::warning
+Extracting `actions` using `storeToRefs` will result in `actions` being `undefined`. To extract `actions` from the store, you should skip using `storeToRefs`
+
+```
+const store = useStore()
+
+const { fullName, age } = store
+const { logIn } = store
+```
+:::