mhrx
a vuex experimental implementant for menhera
Last updated 3 years ago by vaiii .
MIT · Original npm · Tarball · package.json
$ cnpm install mhrx 
SYNC missed versions from official npm registry.

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
    }
  }
});

Current Tags

  • 0.0.2                                ...           latest (3 years ago)

2 Versions

  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 2
Dependencies (3)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |