Created
September 29, 2020 21:56
-
-
Save reireynoso/6f8ea8374dcf3bbbb29fc7269fa5ad75 to your computer and use it in GitHub Desktop.
Context API index
This file contains hidden or 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 ReactDOM from "react-dom"; | |
import App from "./App"; | |
import { Provider } from "./GlobalState"; | |
import reducer, { initialState } from "./reducer"; | |
const rootElement = document.getElementById("root"); | |
ReactDOM.render( | |
<React.StrictMode> | |
<Provider initialState={initialState} reducer={reducer}> | |
<App /> | |
</Provider> | |
</React.StrictMode>, | |
rootElement | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment