emit-state:用于更改单个状态对象的EventEmitter

时间:2021-05-18 08:01:31
【文件属性】:
文件名称:emit-state:用于更改单个状态对象的EventEmitter
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-18 08:01:31
JavaScript 发射状态 EventEmitter用于更改单个状态对象。 受到启发。 安装 npm install emit-state 用法 var createStateEmitter = require ( 'emit-state' ) var actions = require ( './actions.js' ) var store = createStateEmitter ( actions ) store . on ( 'update' , function ( newState , oldState ) { // main render loop // this is fired anytime there is a state change from // the registered actions } ) // Kick off initial action st
【文件预览】:
emit-state-master
----test.js(1KB)
----.travis.yml(68B)
----.gitignore(14B)
----index.js(972B)
----readme.md(2KB)
----package.json(891B)

网友评论