Middleware are being used in redux for extended functionality. it works between dispatching an action, and the moment it reaches to the reducer.
The most common use case for middleware is to support asynchronous actions.
The Customized middleware functions can be created by writing high order functions (a function that returns another function), which wraps around some logic.
Middleware are used Redux for
- logging
- crash reporting
- routing
- asynchronous API calls