UNPKG

react-redux-fetch

Version:

A declarative and customizable way to fetch data for React components and manage that data in the Redux state

15 lines (12 loc) 291 B
import merge from 'lodash/merge'; import actions from '../actions'; const onRejection = (store, next, action, meta) => reason => ( next(actions.for(action.method).reject( merge( action, { reason, request: { meta }, }), )) ); export default onRejection;