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
.
- Source: core/nuxt.js
Hooks
We can register hooks on certain life cycle events.
this.nuxt.hook('ready', async nuxt => {
// Your custom code here
})
Plugin | Arguments | When |
---|---|---|
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 ). |
Edit this page on GitHub
Updated at Fri, Jan 20, 2023
Rishi Raj Jain
Clément Ollivier
Savas Vedova
Steven Soekha
Vinícius Alves
Kareem Dabbeet
Valentín Costa
Ryan Skinner
Daniel Roe
Alex Hirzel
Ajeet Chaulagain
René Eschke
Sébastien Chopin
Nico Devs
Muhammad
Nazaré da Piedade
Naoki Hamada
Tom
Yann Aufray
Anthony Chu
Nuzhat Minhaz
Lucas Portet
Richard Schloss
Bobby Jenkins
bpy
Antony Konstantinidis
Hibariya
Jose Seabra
Eze
Florian LEFEBVRE
Lucas Recoaro
Julien SEIXAS
Hugo
Sylvain Marroufin
Spencer Cooley
Piotr Zatorski
Vladimir Semenov
Harry Allen
kazuya kawaguchi
Unai Mengual
Hyunseung Lee
Alexandre Chopin
pooya parsa
Nick Medrano
Mosaab Emam
Iljs Путлер Капут
Heitor Ramon Ribeiro
Nero
Yoon Han
Ikko Eltociear Ashimine
FamCodings
Ayouli
F. Hinkelmann
felipesuri
Christophe Carvalho Vilas-Boas
Leoš Literák
Trizotti
Marcello Bachechi
Rodolphe
Thomas Underwood