From: istiyak Date: Wed, 9 Feb 2022 07:34:49 +0000 (+0530) Subject: docs: add hint on destructuring actions from store X-Git-Tag: @pinia/testing@0.0.10~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9e542d229f5cdf1159b2d2e3f86b2f7f0ea24a6;p=thirdparty%2Fvuejs%2Fpinia.git docs: add hint on destructuring actions from store --- diff --git a/packages/docs/core-concepts/index.md b/packages/docs/core-concepts/index.md index 4eb3fcc0..03230718 100644 --- a/packages/docs/core-concepts/index.md +++ b/packages/docs/core-concepts/index.md @@ -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 +``` +:::