Skip to content

alkhe/fluxette-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Promise middleware for fluxette.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published