Skip to content

Commit d6c3cf9

Browse files
theolavauxposva
andauthored
docs: update nuxt.js examples in plugins.md (#1150)
Co-authored-by: Eduardo San Martin Morote <[email protected]>
1 parent 820e97e commit d6c3cf9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/docs/core-concepts/plugins.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,14 @@ function MyPiniaPlugin({ store }: PiniaPluginContext) {
371371
console.log(`[🍍 ${mutation.storeId}]: ${mutation.type}.`)
372372
})
373373

374+
// Note this has to be typed if you are using TS
374375
return { creationTime: new Date() }
375376
}
376377

377-
const myPlugin: Plugin = ({ pinia }) {
378-
pinia.use(MyPiniaPlugin);
378+
const myPlugin: Plugin = ({ $pinia }) => {
379+
$pinia.use(MyPiniaPlugin)
379380
}
381+
380382
export default myPlugin
381383
```
382384

0 commit comments

Comments
 (0)