const orderMixin = { computed: { types() { return this.$store.state.types; } }, created() { this.$store.dispatch('updateTypes'); } } const store = new Vuex.Store({ state: { types: [] }, actions: { updateTypes (ctx) { if(!ctx.state.types.length) { // fetch } } } }) export default { name: 'A', mixins: [orderMixin], }