Created
December 2, 2019 17:42
-
-
Save jsoneaday/a4035f431caa0b64f922c69bd0885e10 to your computer and use it in GitHub Desktop.
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 ReactDOM from "react-dom"; | |
import { BrowserRouter } from "react-router-dom"; | |
import App from "./App"; | |
import configureStore from "./shared/store/configureStore"; | |
import registerServiceWorker from "./registerServiceWorker"; | |
import { Provider } from "react-redux"; | |
import ErrorBoundary from "./shared/components/ErrorBoundary"; | |
import Modal from "react-modal"; | |
import ApolloClient, { InMemoryCache } from "apollo-boost"; | |
import { ApolloProvider } from "@apollo/react-hooks"; | |
import { ApolloProvider as ApolloHooksProvider } from "react-apollo-hooks"; | |
import "bootstrap/dist/css/bootstrap.min.css"; | |
import "./index.scss"; | |
const apolloClient = new ApolloClient({ | |
uri: process.env.REACT_APP_SERVER_URL, | |
credentials: "include", | |
cache: new InMemoryCache() | |
}); | |
const store = configureStore(); | |
ReactDOM.render( | |
<Provider store={store}> | |
<BrowserRouter> | |
<ApolloProvider client={apolloClient}> | |
<ApolloHooksProvider client={apolloClient}> | |
<ErrorBoundary>{[<App key="App" />]}</ErrorBoundary> | |
</ApolloHooksProvider> | |
</ApolloProvider> | |
</BrowserRouter> | |
</Provider>, | |
document.getElementById("root") as HTMLElement | |
); | |
Modal.setAppElement("#root"); | |
registerServiceWorker(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment