Description applies to client-side only!
The hooks from asyncData to mounted are called in order on first page load and when navigating to further routes. They receive the Nuxt context as their first argument.
asyncData (blocking)
- Can be used in page components only
- Cannot access the component instance (this)
- Cannot access the DOM (this.$refs)
- Should return a promise, or use async/await
- Result is integrated into the component’s data
- Nuxtjs Cheat Sheet - Free download as PDF File (.pdf), Text File (.txt) or read online for free. NuxtJS Cheat Sheet.
- Nuxt.js Cheatsheet We’ve included the shortcuts for the most commonly used aspects of Storyblok with Nuxt.js. Our cheat sheet is available in pdf A4 format.
- NUXT.JS ESSENTIALS CHEAT SHEET. Title: nuxtjs-cheatSheet Author: Gregg Pollack Created Date: 9/25/2018 8:02:03 AM.
- Video produced by Vue Mastery, download their free Nuxt Cheat Sheet. Modular Nuxt is based on a powerful modular architecture. You can choose from more than 50 modules to make your development faster and easier. You don't have to reinvent the wheel to get PWA benefits, add Google Analytics to your page or generate a sitemap.
beforeCreate
GitHub Gist: star and fork ChrisLegaxy's gists by creating an account on GitHub.
- Can be used in any component
- Cannot access the component instance (this)
- Cannot access the DOM (this.$refs)
created
- Can be used in any component
- Can access the component instance (this)
- Cannot access the DOM (this.$refs)
beforeMount
- Can be used in any component
- Can access the component instance (this)
- Cannot access the DOM (this.$refs)
fetch (description)
- Can be used in any component
- Can access the component instance (this)
- Cannot access the DOM (this.$refs)
- Should write data to the Vuex store
- Called in sequence of their hierarchy
- Not called on query string changes by default (watcher)
mounted
- Can be used in any component
- Can access the component instance (this)
- Can access the DOM (this.$refs)
beforeUpdate
Nuxt Cheat Sheet
- Can be used in any component
- Can access the component instance (this)
- Can access the DOM (this.$refs)
updated
- Can be used in any component
- Can access the component instance (this)
- Can access the DOM (this.$refs)
beforeDestroy
Vue Mastery Nuxt Cheat Sheet
- Can be used in any component
- Can access the component instance (this)
- Can access the DOM (this.$refs)
destroyed
- Can be used in any component
- Cannot access the component instance (this)
- Cannot access the DOM (this.$refs)
Nuxt Js Cheat Sheet
https://nuxtjs.org/docs/2.x/concepts/nuxt-lifecycle
https://www.digitalocean.com/community/tutorials/vuejs-component-lifecycle
https://www.digitalocean.com/community/tutorials/vuejs-component-lifecycle