svrcekmichal / redux-axios-middleware

Redux middleware for fetching data with axios HTTP client
MIT License
922 stars 96 forks source link

Add support for initial request suffix #92

Closed bostondv closed 5 years ago

bostondv commented 5 years ago

Thanks for this great library!

When implementing a loading reducer I found I needed to easily identify and target dispatched request actions from successes, failures and others. For example, by appending "_REQUEST" in the same way this middleware does for success and fail.

So this PR adds the ability to optionally set a suffix on all request actions. By default it leaves the type unchanged.