【文件属性】:
文件名称:refluxxor:反流异物
文件大小:15KB
文件格式:ZIP
更新时间:2021-06-11 04:58:02
JavaScript
用法
定义商店:
class UserStore extends Store {
onSomething() {
this.trigger('foo')
//or
this.replaceState({loaded: true});
}
storeDidMount(flux) {
this.bindTo(flux.actions.loginSuccess, x => this.replaceState({user: x}))
}
//inherits subscribe(f)
}
class PageStore extends AutoBindStore {
//AutoBindStore will auto connect flux actions to your method names
//and optionally t
【文件预览】:
refluxxor-master
----readme.rst(3KB)
----src()
--------flux.js(794B)
--------mixins.js(5KB)
--------stores.js(4KB)
--------actions.js(3KB)
--------index.js(351B)
----gulpfile.js(343B)
----LICENSE(1KB)
----dist()
--------flux.js(2KB)
--------mixins.js(6KB)
--------stores.js(7KB)
--------actions.js(4KB)
--------index.js(900B)
----tests()
--------actions_test.js(671B)
----package.json(583B)