var createStore = require('redux').createStore
var indexStore = createStore(function(state=0,action){
switch(action.type){
case 1:
return ++state
case 0:
return --state
default:
return state
}
})
indexStore.subscribe(function(){
console.log(indexStore.getState())
})
indexStore.dispatch({type:1})
Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号