Update root call

This commit is contained in:
Pierre HUBERT 2022-08-04 17:24:53 +02:00
parent 6e992735a3
commit 51c23a93fe

View File

@ -1,15 +1,21 @@
import React from 'react'; import React from "react";
import ReactDOM from 'react-dom'; import { createRoot } from "react-dom/client";
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
ReactDOM.render( import App from "./App";
import "./index.css";
import reportWebVitals from "./reportWebVitals";
async function init() {
const container = document.getElementById("root");
const root = createRoot(container!);
root.render(
<React.StrictMode> <React.StrictMode>
<App /> <App />
</React.StrictMode>, </React.StrictMode>
document.getElementById('root') );
); }
init();
// If you want to start measuring performance in your app, pass a function // If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log)) // to log results (for example: reportWebVitals(console.log))