Skip to content

Instantly share code, notes, and snippets.

@anlisha-maharjan
Last active April 26, 2022 06:32
Show Gist options
  • Save anlisha-maharjan/f1c268af0d3fa393e7b550757be57770 to your computer and use it in GitHub Desktop.
Save anlisha-maharjan/f1c268af0d3fa393e7b550757be57770 to your computer and use it in GitHub Desktop.
Basic entry point file index.js of React application.
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import CssBaseline from "@mui/material/CssBaseline";
import { ThemeProvider } from "@mui/material/styles";
import theme from "./configs/theme";
import "./assets/scss/main.scss";
import "./i18n";
ReactDOM.render(
<React.StrictMode>
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
<App />
</ThemeProvider>
</React.StrictMode>,
document.getElementById("root")
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment