From c674f80b527c171ece621500b642c4399831acd1 Mon Sep 17 00:00:00 2001 From: Martin Man Date: Wed, 18 Sep 2024 14:02:08 +0200 Subject: [PATCH] fix(react): use createRoot --- src/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index fc1b6dc6..4cff034f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,6 @@ import "react-app-polyfill/stable" import React from "react" -import ReactDOM from "react-dom" +import { createRoot } from "react-dom/client" import { getParameterByName } from "./app/utils/util" import registerServiceWorker from "./serviceWorkerRegistration" import * as Sentry from "@sentry/react" @@ -80,7 +80,10 @@ Sentry.init({ }, }) -ReactDOM.render({getApp()}, document.getElementById("root")) +const container = document.getElementById("root") +const root = createRoot(container!) + +root.render({getApp()}) registerServiceWorker()