Chaining Actions
const foo = () => {
return dispatch => {
return dispatch({
type: 'TYPE',
payload: new Promise()
}).then(() => dispatch(bar()));
};
}const foo = () => {
return dispatch => {
return dispatch({
type: 'TYPE',
payload: Promise.all([
dispatch(bar()),
dispatch(baz())
])
});
};
}Last updated