in React JS by
Q:

 How to add multiple middlewares to Redux?

► Click here to show 1 Answer

0 votes
by

You can use applyMiddleware where you can pass each piece of middleware as a new argument. So you just need to pass each piece of middleware you'd like. For example, you can add Redux Thunk and logger middlewares as an argument as below,

import { createStore, applyMiddleware } from 'redux'
const createStoreWithMiddleware = applyMiddleware(ReduxThunk, logger)(createStore);
React JS
Learn More with Madanswer

Related questions

0 votes
asked Jun 19, 2020 in React JS by JackTerrance
...