Check out a free preview of the full Vuex for Intermediate Vue.js Developers course:
The "Composing Vuex Actions Exercise" Lesson is part of the full, Vuex for Intermediate Vue.js Developers course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to chain actions by first dispatching an action to check if the machine is working, and, if it is, dispatching an action to run an API call.

Get Unlimited Access Now

Transcript from the "Composing Vuex Actions Exercise" Lesson

>> I'll send you off to do your first exercise unassisted. And in this particular exercise, all I want you to do is in the fetch from inventory action, I want you to dispatch a call to the next action. And for this, we're going to be using and moving into another folder.

[00:00:21] Again, we're using submodules here. But I'll show you how exactly to navigate. So it's called vuex-compose-actions. So if I'm in my front-end masters main code, I can sort of CD into that specific directory. And you should be starting from step zero and step zero will give you just a very clean sense of, you'll see your store and you'll see actions to actions.

[00:00:51] And you'll see some comments as well with some helpers as to how exactly to write your code.