Skip to main content
InterviewHubPRO
Section Overview
Q107

Question 107 of 407

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

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

How to access Redux store outside a component?

mid LevelMost AskedCode ExampleComponentsState Management

You just need to export the store from the module where it created with createStore(). Also, it shouldn't pollute the global window object.

javascript
store = createStore(myReducer);

export default store;