Open anatoliyarkhipov opened 9 years ago
We can also add the progress
key to the reducerMap instead of using some special handleProgress
function:
handleAction('FETCH_DATA', {
next(state, action) {...}
throw(state, action) {...}
progress(state, action) {...}
});
Keep in mind though that progress
is deprecated and not part of the Promises/A+ standard.
+1
Hi. The Promise middleware is very cool, but what if we add the progress tracking too? It may looks like this:
Even if the promise do not supports the progress callback, the first call of it can be useful to determine that we must display some kind of gif-spinner.
Usage example: