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:
parent
825b2bdafd
commit
1dcc79cb09
1 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ Remember that actions only describe that something happened, they don't describe
|
||||||
state.users.push(user);
|
state.users.push(user);
|
||||||
},
|
},
|
||||||
[types.REQUEST_ADD_USER_ERROR](state, error) {
|
[types.REQUEST_ADD_USER_ERROR](state, error) {
|
||||||
state.isAddingUser = true;
|
state.isAddingUser = false;
|
||||||
state.errorAddingUser = error;
|
state.errorAddingUser = error;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -231,7 +231,7 @@ The store should be included in the main component of your application:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// app.vue
|
// 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 {
|
export default {
|
||||||
name: 'application',
|
name: 'application',
|
||||||
|
|
Loading…
Reference in a new issue