diff options
author | Mark Florian <553096-markrian@users.noreply.gitlab.com> | 2019-04-08 15:16:21 +0000 |
---|---|---|
committer | Mark Florian <553096-markrian@users.noreply.gitlab.com> | 2019-04-08 15:16:21 +0000 |
commit | 0efff5d18d72b221c6cb7c8b3d546a7d91bf73d3 (patch) | |
tree | 99b2de1da34fd084bbc320041a056c416e11f88d /doc | |
parent | 425377f35747131bed6550170af576d3028b28f9 (diff) | |
download | gitlab-ce-0efff5d18d72b221c6cb7c8b3d546a7d91bf73d3.tar.gz |
Use RECEIVE namespace rather than REQUESTmore-consistent-namespacing-vuex-example-code
This brings the mutation type name closer to the associated action,
so the documented example is more consistent.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/development/fe_guide/vuex.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 7b54fa6289c..7d52cac5f7e 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -83,7 +83,7 @@ In this file, we will write the actions that will call the respective mutations: export const requestUsers = ({ commit }) => commit(types.REQUEST_USERS); export const receiveUsersSuccess = ({ commit }, data) => commit(types.RECEIVE_USERS_SUCCESS, data); - export const receiveUsersError = ({ commit }, error) => commit(types.REQUEST_USERS_ERROR, error); + export const receiveUsersError = ({ commit }, error) => commit(types.RECEIVE_USERS_ERROR, error); export const fetchUsers = ({ state, dispatch }) => { dispatch('requestUsers'); @@ -175,7 +175,7 @@ Remember that actions only describe that something happened, they don't describe state.users = data; state.isLoading = false; }, - [types.REQUEST_USERS_ERROR](state, error) { + [types.RECEIVE_USERS_ERROR](state, error) { state.isLoading = false; }, [types.REQUEST_ADD_USER](state, user) { |