1.0.1 • Published 6 years ago

vuex-mutations v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Simple Vuex mutations

GitHub license

This plug-in saves the state of your app in the local storage and simplifies the development of mutations.

Installation

Install through npm:

npm install --save vuex-mutations

Usage

Use it in your app like so:

import VuexMutations from 'vuex-mutations';
Vue.use(Vuex)

export default new Vuex.Store(
  VuexMutations({
    state: {
      user: { asd: 1 },
      some_data: 123
    },
  })
);
this.$store.commit('someData', 'new some data value');
this.$store.commit('user', { new: 'user' });