Skip to main content
InterviewHubPRO
Section Overview
Q131

Question 131 of 407

Part 5: React Redux State Management (101 - 134)

32%
React Core & Hooks (407 Qs)•Part 5: React Redux State Management (101 - 134)

How to add multiple middlewares to Redux?

mid LevelMost AskedCode ExampleState Management

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);