Couple of improvements to the Vuex frontend guide

Two nitpick improvements to the following:

* set `state.isAddingUser = false` when request resulted in an error,
  as it has finished after all
* be very explicit about vuex store being a local module to avoid confusion
  about a dependency named `store`
This commit is contained in:
Phillip Johnsen 2019-05-10 22:53:02 +00:00
parent 825b2bdafd
commit 1dcc79cb09
1 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ Remember that actions only describe that something happened, they don't describe
state.users.push(user);
},
[types.REQUEST_ADD_USER_ERROR](state, error) {
state.isAddingUser = true;
state.isAddingUser = false;
state.errorAddingUser = error;
},
};
@ -231,7 +231,7 @@ The store should be included in the main component of your application:
```javascript
// app.vue
import store from 'store'; // it will include the index.js file
import store from './store'; // it will include the index.js file
export default {
name: 'application',