fluxette-promise

0.1.0 • Public • Published

fluxette-promise

Promise middleware for fluxette.

Install

npm install --save fluxette-promise

Usage

Allows you to chain dispatches by Promise, and turns thunked dispatches into Promises.

import Flux from 'fluxette';
import promise from 'fluxette-promise';
 
let flux = Flux(reducers).using(promise);
let { dispatch } = flux;
 
dispatch(
    dataPromise(url)
        .then(data => ({ type: DATA_SUCCESS, data }))
        .catch(err => ({ type: DATA_FAILURE, err }))
);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i fluxette-promise

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • synchronous