⚠️ You are looking at the english version of the page. Help us translate it here.
Want to take a look at our new docs? Our new docs are now in beta. Have fun!

The Nuxt Class

This is the core container which allows all modules and classes communicate with each other. All modules have access to Nuxt instance using this.nuxt.

Hooks

We can register hooks on certain life cycle events.

nuxt.hook('ready', async nuxt => {
  // Your custom code here
})
PluginArgumentsWhen
ready(nuxt)Nuxt is ready to work (ModuleContainer and Renderer ready).
error(error)An unhandled error when calling hooks.
close(nuxt)Nuxt instance is gracefully closing.
listen(server, {host, port})Nuxt internal server starts listening. (Using nuxt start or nuxt dev).

Contributors

Contribution for this page is now closed. If you would like to contribute please check out our new docs are now in beta. Have fun!

Platinum Sponsors

StoryblokMoovweb Support Us