reflux-waitfor

1.0.1 • Public • Published

reflux-waitfor Build Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i reflux-waitfor

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dtinth