diff --git a/src/index.tsx b/src/index.tsx index 11695da..5e98cce 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import ReactDOM from "react-dom"; +import { createRoot } from "react-dom/client"; import { HelmetProvider, Helmet } from "react-helmet-async"; import "@fontsource/space-grotesk/index.css"; import "@fontsource/roboto/index.css"; @@ -9,7 +9,9 @@ import "./index.css"; import App from "./App"; import reportWebVitals from "./reportWebVitals"; -ReactDOM.render( +const container = document.getElementById("root"); +const root = createRoot(container!); +root.render( @@ -23,8 +25,7 @@ ReactDOM.render( - , - document.getElementById("root") + ); // If you want to start measuring performance in your app, pass a function