My vuex store looks like this but when calling addCustomer I get ReferenceError: state is not defined:
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
export default new Vuex.Store({
  state: { customers: [] },
  mutations: {
    addCustomer: function (customer) {
      state.customers.push(customer); // error is thrown here
    }
  }
});
This is the addCustomer binding/template:
<template>
    <button class="button" @click="addCustomer">Add Customer</button>
</template>
This is the definition for addCustomer:
<script>
  export default {
    name: "bootstrap",
    methods: {
      addCustomer: function() {
        const customer = {
          name: 'Some Name',
        };
        this.$store.commit('addCustomer', customer);
      }
    }
  }
</script>