Created
April 22, 2020 00:51
-
-
Save kevinhooke/44a460a5ad6fea6ef84d5821f4b8a1a7 to your computer and use it in GitHub Desktop.
react redux : use <Provider> to make store available to components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import store from './stores/Store'; | |
import App from './App'; | |
render( | |
<Provider store={store}> | |
<App /> | |
</Provider>, | |
document.getElementById("root") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment