From d6c3cf913bb9d41bfaaa558af15a384e0acf9cc1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Th=C3=A9o=20LAVAUX?= Date: Wed, 16 Mar 2022 17:49:37 +0100 Subject: [PATCH] docs: update nuxt.js examples in plugins.md (#1150) Co-authored-by: Eduardo San Martin Morote --- packages/docs/core-concepts/plugins.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/docs/core-concepts/plugins.md b/packages/docs/core-concepts/plugins.md index 16927fb1..b832ec8c 100644 --- a/packages/docs/core-concepts/plugins.md +++ b/packages/docs/core-concepts/plugins.md @@ -371,12 +371,14 @@ function MyPiniaPlugin({ store }: PiniaPluginContext) { console.log(`[🍍 ${mutation.storeId}]: ${mutation.type}.`) }) + // Note this has to be typed if you are using TS return { creationTime: new Date() } } -const myPlugin: Plugin = ({ pinia }) { - pinia.use(MyPiniaPlugin); +const myPlugin: Plugin = ({ $pinia }) => { + $pinia.use(MyPiniaPlugin) } + export default myPlugin ``` -- 2.47.2