Vue.js
Lifecycle
Lifecycle, in case with SSR
Since there are no dynamic updates, of all the lifecycle hooks, only beforeCreate
and created
will be called during SSR. This means any code inside other lifecycle hooks such as beforeMount
or mounted
will only be executed on the client.
Nuxt.js
The big picture
間違いあれば、ご指摘頂けると助かります
Middlewares, the big picture
Understanding modules, serverMiddleware and plugins in Nuxt Js Configuration @nuxt_js @vuejs ✍️ pic.twitter.com/QSubHBkECP
— krutiepatel (@KrutiePatel) June 2, 2018
Lifecycle hooks, the big picture
Understanding Nuxt.js Lifecycle Hooks... @nuxt_js @vuejs ...had ton of fun creating this diagram. ✍️ pic.twitter.com/nDu1dXRfEF
— krutiepatel (@KrutiePatel) May 25, 2018
According to this diagram, the hooks happen in this order:
nuxtServerInit
, middleware, and thenfetch
andasyncData
.