mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 09:55:53 +00:00
docs: fix example runtime hook plugin syntax (#4831)
This commit is contained in:
parent
6b1671181e
commit
342ecb9737
@ -35,9 +35,11 @@ App hooks can be mainly used by [Nuxt Plugins](/guide/directory-structure/plugin
|
|||||||
### Usage with Plugins
|
### Usage with Plugins
|
||||||
|
|
||||||
```js [plugins/test.ts]
|
```js [plugins/test.ts]
|
||||||
export defineNuxtPlugin(nuxtApp) {
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
nuxtApp.hook('page:start', () => { })
|
nuxtApp.hook('page:start', () => {
|
||||||
}
|
/* your code goes here */
|
||||||
|
})
|
||||||
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
::alert{icon=👉}
|
::alert{icon=👉}
|
||||||
|
Loading…
Reference in New Issue
Block a user