From: istiyak Date: Wed, 9 Feb 2022 10:36:05 +0000 (+0530) Subject: docs: remove warning layout X-Git-Tag: @pinia/testing@0.0.10~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=428d2e0ed8745e9bca3147c113e482c0d7508f9c;p=thirdparty%2Fvuejs%2Fpinia.git docs: remove warning layout --- diff --git a/packages/docs/core-concepts/index.md b/packages/docs/core-concepts/index.md index ca702b77..9af95324 100644 --- a/packages/docs/core-concepts/index.md +++ b/packages/docs/core-concepts/index.md @@ -89,8 +89,7 @@ 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` +Extracting `actions` using `storeToRefs` will result in `actions` being `undefined`. To extract `actions` from the store, you should skip using `storeToRefs`: ```js import { storeToRefs } from 'pinia' @@ -108,7 +107,7 @@ export default defineComponent({ increment() // "undefined" - // if you want to only destructure `actions` + // ✅ if you want to only destructure `actions` // from the store then don't use `storeToRefs` const { increment } = store @@ -116,17 +115,6 @@ export default defineComponent({ counter // 2 }) ``` -::: - -:::tip -- **To extract only the properties from the store:** - - `const { counter } = counterStore` - -
- -- **To extract only the actions from the store:** - - `const { increment, decrement } = counterStore` -:::