Vuex Fundamentals

Lessons

1. Intro to Vuex

5:36

2. Global State

7:36

3. Updating State

8:04

4. Fetching State

13:31

5. Error Handling

6:52

6. Next Steps

2:30

Fetching State

In the previous lesson, we learned how to commit a mutation to update our Vuex state. While our code works the way we have it, we’re not following best practices with Vuex. It is recommended by Core Vue Team Members to always wrap your mutations within actions.

So what is an action, exactly? An action allows us to program more nuanced behavior as it pertains to our app-wide state management. For example, what if we needed to run some conditional logic, or wait for