From 342ecb9737cdd65d6831f6f16fa0b26e6be90b20 Mon Sep 17 00:00:00 2001 From: Jonty Brook Date: Fri, 6 May 2022 09:48:10 +0100 Subject: [PATCH] docs: fix example runtime hook plugin syntax (#4831) --- docs/content/2.guide/6.going-further/2.hooks.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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=👉}