--- title: 'Lifecycle Hooks' description: Nuxt provides a powerful hooking system to expand almost every aspect using hooks. --- :read-more{to="/docs/guide/going-further/hooks"} ## App Hooks (runtime) Check the [app source code](https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/nuxt.ts#:~:text=export%20interface%20RuntimeNuxtHooks) for all available hooks. Hook | Arguments | Environment | Description -----------------------|---------------------|-----------------|------------- `app:created` | `vueApp` | Server & Client | Called when initial `vueApp` instance is created. `app:error` | `err` | Server & Client | Called when a fatal error occurs. `app:error:cleared` | `{ redirect? }` | Server & Client | Called when a fatal error occurs. `app:data:refresh` | `keys?` | Server & Client | (internal) `vue:setup` | - | Server & Client | (internal) `vue:error` | `err, target, info` | Server & Client | Called when a vue error propagates to the root component. [Learn More](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured). `app:rendered` | `renderContext` | Server | Called when SSR rendering is done. `app:redirected` | - | Server | Called before SSR redirection. `app:beforeMount` | `vueApp` | Client | Called before mounting the app, called only on client side. `app:mounted` | `vueApp` | Client | Called when Vue app is initialized and mounted in browser. `app:suspense:resolve` | `appComponent` | Client | On [Suspense](https://vuejs.org/guide/built-ins/suspense.html#suspense) resolved event. `app:manifest:update` | `{ id, timestamp }` | Client | Called when there is a newer version of your app detected. `link:prefetch` | `to` | Client | Called when a `` is observed to be prefetched. `page:start` | `pageComponent?` | Client | Called on [Suspense](https://vuejs.org/guide/built-ins/suspense.html#suspense) pending event. `page:finish` | `pageComponent?` | Client | Called on [Suspense](https://vuejs.org/guide/built-ins/suspense.html#suspense) resolved event. `page:loading:start` | - | Client | Called when the `setup()` of the new page is running. `page:loading:end` | - | Client | Called after `page:finish` `page:transition:finish`| `pageComponent?` | Client | After page transition [onAfterLeave](https://vuejs.org/guide/built-ins/transition.html#javascript-hooks) event. `dev:ssr-logs` | `logs` | Client | Called with an array of server-side logs that have been passed to the client (if `features.devLogs` is enabled). `page:view-transition:start` | `transition` | Client | Called after `document.startViewTransition` is called when [experimental viewTransition support is enabled](/docs/getting-started/transitions#view-transitions-api-experimental). ## Nuxt Hooks (build time) Check the [schema source code](https://github.com/nuxt/nuxt/blob/main/packages/schema/src/types/hooks.ts#:~:text=export%20interface%20NuxtHooks) for all available hooks. Hook | Arguments | Description -------------------------|----------------------------|------------- `kit:compatibility` | `compatibility, issues` | Allows extending compatibility checks. `ready` | `nuxt` | Called after Nuxt initialization, when the Nuxt instance is ready to work. `close` | `nuxt` | Called when Nuxt instance is gracefully closing. `restart` | `{ hard?: boolean }` | To be called to restart the current Nuxt instance. `modules:before` | - | Called during Nuxt initialization, before installing user modules. `modules:done` | - | Called during Nuxt initialization, after installing user modules. `app:resolve` | `app` | Called after resolving the `app` instance. `app:templates` | `app` | Called during `NuxtApp` generation, to allow customizing, modifying or adding new files to the build directory (either virtually or to written to `.nuxt`). `app:templatesGenerated` | `app` | Called after templates are compiled into the [virtual file system](/docs/guide/directory-structure/nuxt#virtual-file-system) (vfs). `build:before` | - | Called before Nuxt bundle builder. `build:done` | - | Called after Nuxt bundle builder is complete. `build:manifest` | `manifest` | Called during the manifest build by Vite and webpack. This allows customizing the manifest that Nitro will use to render `