Skip to content

use mobx like vuex. current default branch: dev-v1

License

Notifications You must be signed in to change notification settings

evollhhan/mobxplus

Repository files navigation

Mobx Plus

Use mobx like vuex. There are two versions of different usage. See branch dev-v1 & dev-v2 for more detail. The source code of mobxplus locates @ src/store/MobxPlus.ts

Though this project needs further development, you could run demo now. This demo is based on typescript + react.

Branch: dev-v1

//
// Create Store
// ----
import MobxPlus from "./MobxPlus";

const store = new MobxPlus({
  state,
  actions,
  mutations,
  getters,
  watcher
})

//
// Just use it like vuex
// ----
// 1. commit
store.commit("EventName", EventData);
// 2. dispatch
store.dispatch("LOAD_USERINFO");

How to view demo

  1. clone / download source code
  2. npm install
  3. webpack
  4. open index.html

About

use mobx like vuex. current default branch: dev-v1

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published