Last active
February 1, 2021 12:59
-
-
Save Dirk94/781456a791af7e6124409a0e185197fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| actions: { | |
| async addTodo({ commit }, todo) { | |
| // This is a fake function to illustrate the example. | |
| const response = await postRequestToTheAPI(todo); | |
| if (response.isOk) { | |
| commit('ADD_TODO', todo); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment