摘要: 更新Redux中状态的流程是这样的:action -> reducer -> new state。 每次action被触发(dispatch),reducer就会同步地对store进行更新 action: 指全局发布的动作指令,主要就是定义所有事件行为的,例如: export const ADD_N 阅读全文
posted @ 2018-10-15 16:28 haveProgress 阅读(105) 评论(0) 推荐(0) 编辑
摘要: var p = new Promise(function(resolve, reject){ setTimeout(function(){ console.log('执行完成'); resolve('随便什么数据'); }, 2000);}); p.then(function(value){cons 阅读全文
posted @ 2018-10-15 12:14 haveProgress 阅读(83) 评论(0) 推荐(0) 编辑