Skip to content

Instantly share code, notes, and snippets.

@helloanil
Created February 12, 2019 00:26
Show Gist options
  • Save helloanil/cf77dff3d176f44a75100c3a65b3a188 to your computer and use it in GitHub Desktop.
Save helloanil/cf77dff3d176f44a75100c3a65b3a188 to your computer and use it in GitHub Desktop.
CRA-I18N index.js
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
import { I18nContextProvider } from "./i18n";
// Nothing fancy, just wrap the App
ReactDOM.render(
<I18nContextProvider>
<App />
</I18nContextProvider>,
document.getElementById("root"),
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment