Skip to content

Commit

Permalink
docs: show store
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 11, 2023
1 parent 038dbd4 commit c0524e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/docs/guide/advanced/navigation-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ app.provide('global', 'hello injections')
// router.ts or main.ts
router.beforeEach((to, from) => {
console.log(inject('global')) // -> 'hello injections'
const global = inject('global') // 'hello injections'
// a pinia store
const userStore = useAuthStore()
// ...
})
```
Expand Down

0 comments on commit c0524e9

Please sign in to comment.