Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

The Vue.js 3 Masterclass

Get access to the most comprehensive Vue.js video library in the world. Over 300 video lessons including the newest Vue 3 features.

Creating Vuex Actions that Fetch Multiple Items from Cloud Firestore

🚧 PLEASE NOTE: This masterclass is built with the Options API

The Composition API Masterclass is coming soon!

When we're working with a data structure that has multiple resources grouped under one, it's very handy to have a Vuex action that can fetch multiple resources with one call.

In this lesson, we'll create that Vuex action, that given an array of post id's will fetch and return an array of the post objects from the Cloud Firestore. We'll then dispatch the action in the Vue.js created lifecycle hook to get the posts for the Forum page.