0.1.0 • Published 9 years ago

fluxette-promise v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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 }))
);
0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago