Store actions

Store actions (including nuxtServerInit)

// In store
{
  actions: {
    async fetchAllProducts ({ commit }) {
      const products = await this.$shopify.product.fetchAll();
      commit('SET_PRODUCTS', products)
    }
  }
}
Edit this page on GitHub Updated at Wed, Apr 5, 2023