From eb5c176616cbd183b4d984a660b74ef39701cfb3 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 23 Apr 2022 12:39:33 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"refactor(ui):=20=E2=99=BB?= =?UTF-8?q?=EF=B8=8F=20use=20new=20createRoot""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 77c53b0b3f8dd75e8d42ad3bf26219ef07a8a3f3. --- web/src/index.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/src/index.tsx b/web/src/index.tsx index dcc257fe2..079f7c698 100644 --- a/web/src/index.tsx +++ b/web/src/index.tsx @@ -1,14 +1,16 @@ import React from "react"; -import ReactDOM from "react-dom"; -import { App } from "./App"; +import ReactDOM from "react-dom/client"; import "./index.css"; +import { App } from "./App"; import reportWebVitals from "./reportWebVitals"; -ReactDOM.render( +const root = ReactDOM.createRoot( + document.getElementById("root") as HTMLElement +); +root.render( - , - document.getElementById("root") + ); // If you want to start measuring performance in your app, pass a function