redux-async-api v2.0.1
Async api for use with redux-apis v1.1+ / v2-alpha
Installation
npm install --save redux-async-api
Dependencies and imports
redux-async-api depends on redux-apis, so add a dependency to that as well.
;
Or, using ES5 / require
:
var Async = Async;
Usage
Async
was designed to be used either by extending from it, or by composing it into
other Apis.
Extend from Async
static INITIAL_STATE = ...AsyncINITIAL_STATE result:'pending...' ; { superstate; this; Object; } { return this; } { this; this; return { ; }; }; const async = ; to;to;let promise = async;to;to;to;promise;
Compose Async into other Apis
If you can't or don't want to extend from Async
, you can compose it into your Api:
static INITIAL_STATE = result:'pending...' ; { superstate; thisasync = ; this; Object; } { return this; } { thisasync; this; return { ; }; }; const myAsync = ; to;to;let promise = myAsync;to;to;to;promise;
Feedback, suggestions, questions, bugs
Please visit the issue tracker for any of the above. Don't be afraid about being off-topic. Constructive feedback most appreciated!
Copyright
© 2016, Stijn de Witt. Some rights reserved.