in React JS by
Q:

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
Click here to read more about React JS
Click here to read more about Insurance

Related questions

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 Mar 4, 2020 in React JS by JackTerrance
0 votes
0 votes
+1 vote
asked Feb 18, 2020 in JAVA by rahuljain1
0 votes
asked Feb 23 in React JS by SakshiSharma
...