in React JS by
Q:

How to add multiple middlewares to Redux?

1 Answer

0 votes
by

You can use applyMiddleware().

For example, you can add redux-thunk and logger passing them as arguments to applyMiddleware():

import { createStore, applyMiddleware } from 'redux'
const createStoreWithMiddleware = applyMiddleware(ReduxThunk, logger)(createStore)
Click here to read more about React JS
Click here to read more about Insurance

Related questions

0 votes
asked Mar 4, 2020 in React JS by JackTerrance
0 votes
0 votes
0 votes
asked Mar 3, 2020 in React JS by miceperry
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
0 votes
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
0 votes
...