Created
February 28, 2020 16:01
-
-
Save ashour/93e8fd40a7d144d3c5f0a80b58c29f7b to your computer and use it in GitHub Desktop.
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 { hydrate } from "react-dom"; | |
| import { BrowserRouter } from "react-router-dom"; | |
| import App from "./common/App"; | |
| import { determineUserLang } from "./common/i18n"; | |
| const lang = determineUserLang(navigator.languages || []); | |
| hydrate( | |
| <BrowserRouter> | |
| <App lang={lang} /> | |
| </BrowserRouter>, | |
| document.getElementById("root"), | |
| ); | |
| if (module.hot) { | |
| module.hot.accept(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment