Parameter-Based Middleware
Let’s have a look at parameter-based middleware that is more generic and allows better usability.
We'll cover the following...
Some middleware might be reusable and support parameters passed during their creation.
For example, consider the nullMiddleware
we created in the previous section:
const nullMiddleware = () => next => action => {
next(action !== null ? action : { type: 'UNKNOWN'
...