react-redux-pro
v0.1.0
Published
/** main.js **/ import ReactApp from '@react/app' import store from './store' import router from './router'
Downloads
5
Readme
要实现的接口方式
/** main.js **/ import ReactApp from '@react/app' import store from './store' import router from './router'
const app = new ReactApp({ store, router, render: mount => mount(App, '#main') })
/** /store/index.js **/ import ReactStore from '@react/store'
const store = new ReactStore({ state: {} models: { modelName: { namespaced: true, state: {} reducers: { }, effects: { }, watch: { }, getters: { } middlewares: [ ], enhancers: [ ] } }, reducers: { }, effects: { }, watch: { }, getters: { } middlewares: [ ], enhancers: [ ] })
store.actions
/** /router/index.js **/ import ReactRouter from '@react/router'
const router = new ReactRouter({ mode: 'history', routes: [{ path: '/', component: PageComponent, meta: { title: '首页' }, children: [ { path: 'example', component: ExamplePage, meta: { title: '例子' }, } ] }] })
router.match router.push router.replace router.go router.Component