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 Tue, Apr 5, 2022
Nazaré da Piedade
Mosaab Emam
Sylvain Marroufin
Iljs Путлер Капут
Daniel Roe
Heitor Ramon Ribeiro
Nero
Sébastien Chopin
Clément Ollivier
Yoon Han
Ikko Ashimine
FamCodings
Ayouli
F. Hinkelmann
felipesuri
Christophe Carvalho Vilas-Boas
Leoš Literák
Trizotti
Marcello Bachechi
Rodolphe
Thomas Underwood
Shek Evgeniy
Lukasz Formela
Hugo Torzuoli
Kareem Dabbeet
tramplay
verebelyicsaba
Adam
Nate Butler
Sandra Rodgers
Arpit Patidar
Matthew Kuehn
Steven DUBOIS
Travis Lindsey
syagawa
Maxime
かる
Al Power
Florent Delerue
quanghm
José Manuel Casani Guerra
Unai Mengual
kazuya kawaguchi
Michael Lynch
Tomachi
pooya parsa
Meir Roth