Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@repairearth repairearth released this 18 Aug 07:17
· 11 commits to master since this release

New

Add handleMutations, which wraps a set of mutations with handleAction.

mutations: handleMutations({
  SINGLE: (state, mutation) => {
    state.obj = mutation
  },
  CHANGE: {
    pending(state, mutation) {
      state.obj = mutation
    },
    success(state, mutation) {
      state.obj = mutation
    },
    error(state, mutation) {
      state.obj = mutation
    }
  }
})