Why use Vuex in Nuxt?
1:57
From asyncData to Vuex (naive version)
13:06
Refactoring with deserializers, destructuring
9:28
Loading Strategies for Vuex
4:53
Preloading, Middleware, and Promises
13:19
Review of Nuxt + Vuex
3:53
0% done with NuxtJS + Vuex: Deserialization, load strategies, middleware

Chapter 16 of 27 in Building VueScreencasts.com
Preloading, Middleware, and Promises

We’re going to preload all of our data. We’ll accomplish this in several steps.

  1. Separate out loadAllTags from loadAllVideos
  2. Call our loadAll methods from all fetch hooks, remove unused Vuex actions
  3. Make the correct videos show up on the tags page
  4. Ensure no repeat API calls
  5. Using middleware to preload data
  6. Use Promises (RSVP.all or Promise.all) to make API calls in parallel
What do others think of VueScreencasts?
"Great help, helped me solved the Vuex modules mapstate problem I had. Thanks so much again!!"
—kidgr33n
"very nice tips man, appreciate it 💯👏"
—shaun lora
"Really enjoying these, thank you!"
—Lars Sørensen
"You saved my day! Thanks!"
—Ivomar Santos
Take your career to the next level