React & Modern Frontend (445 Qs)•Part 5: React Redux State Management (101 - 134)
How to add multiple middlewares to Redux?
You can use applyMiddleware().
For example, you can add redux-thunk and logger passing them as arguments to applyMiddleware():
javascript
import { createStore, applyMiddleware } from "redux";
const createStoreWithMiddleware = applyMiddleware(
ReduxThunk,
logger
)(createStore);