While developing the EveryNote application, I decided to write an action for each mutation. If an action only commits a mutation, you may avoid writing this action and commit the corresponding mutation inside the components. Like Google Keep, the EveryNote application can be empowered by persisting notes to a remote server so that a user can read his or her notes from any computer or mobile device. In that case, actions come in handy because they can perform asynchronous operations to keep the application state synchronized with a server.
I will not implement the code to persist the application state with a remote server, but I would like to show you an example of how the list of notes can be fetched from a remote server when the app gets loaded.
The idea is that when App.vue is loaded, we can fire a loadNotesFromServer action that will update...