1.0.1 • Published 9 years ago
reflux-waitfor v1.0.1
reflux-waitfor
This project implements Reflux.waitFor(AnotherStore)
that works like Dispatcher.waitFor().
Usage
const Reflux = require('reflux')
require('reflux-waitfor').install(Reflux)
In store action handlers:
const UnreadCountStore = Reflux.createStore({
// ...
onMessageReceive (data) {
Reflux.waitFor(MessageStore)
this.count = MessageStore.getAllMessages().filter(isUnread).length
this.trigger()
},
// ...
See example.js for more example.
See test.js for even more example.
LICENSE
MIT
1.0.1
9 years ago