Skip to content

Commit c0524e9

Browse files
committed
docs: show store
1 parent 038dbd4 commit c0524e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/docs/guide/advanced/navigation-guards.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ app.provide('global', 'hello injections')
145145

146146
// router.ts or main.ts
147147
router.beforeEach((to, from) => {
148-
console.log(inject('global')) // -> 'hello injections'
148+
const global = inject('global') // 'hello injections'
149+
// a pinia store
150+
const userStore = useAuthStore()
151+
// ...
149152
})
150153
```
151154

0 commit comments

Comments
 (0)