mhrx

0.0.2 • Public • Published

Mhrx

a vuex experimental implementant for menhera

Install

$ yarn add menhera mhrx

example

import Mhr from "menhera";
import Mhrx from "mhrx";
 
const store = Mhrx({ name: "Mhrx" });
 
Mhr.$use({
  _mount: {
    store
  },
  Mhrx: {
    state: {
      count: 0
    },
    mutations: {
      increment(state, payload) {
        state.count += payload;
      }
    },
    actions: {
      increment({ commit, dispatch }, payload) {
        commit("increment", payload);
      }
    }
  }
}).$use({
  Mhrx: {
    observe: {
      count(val) {
        console.log(val);
      }
    },
    commit: {
      increment: 10
    },
    dispatch: {
      increment: 10
    }
  }
});

Readme

Keywords

none

Package Sidebar

Install

npm i mhrx

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

3.8 kB

Total Files

5

Last publish

Collaborators

  • vaiii