diff --git a/docs/content/2.guide/6.going-further/2.hooks.md b/docs/content/2.guide/6.going-further/2.hooks.md index 39b18c60ee..c6781d5e3a 100644 --- a/docs/content/2.guide/6.going-further/2.hooks.md +++ b/docs/content/2.guide/6.going-further/2.hooks.md @@ -35,9 +35,11 @@ App hooks can be mainly used by [Nuxt Plugins](/guide/directory-structure/plugin ### Usage with Plugins ```js [plugins/test.ts] -export defineNuxtPlugin(nuxtApp) { - nuxtApp.hook('page:start', () => { }) -} +export default defineNuxtPlugin((nuxtApp) => { + nuxtApp.hook('page:start', () => { + /* your code goes here */ + }) +}) ``` ::alert{icon=👉}