0 votes
in ReactJS by

How to access Redux store outside a component?

1 Answer

0 votes
by

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

store = createStore(myReducer)

export default store

Related questions

0 votes
asked Mar 5, 2022 in ReactJS by DavidAnderson
0 votes
asked Mar 3, 2020 in ReactJS by miceperry
...