From ca0231a349d6ac64b4d1b9ea0d8020c0fdb80f00 Mon Sep 17 00:00:00 2001 From: "wassx@icloud.com" <> Date: Tue, 8 Nov 2022 20:54:47 +0100 Subject: [PATCH] Update to react18 create root --- interface/src/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/src/index.tsx b/interface/src/index.tsx index e0f77e14..1d6b5fe7 100644 --- a/interface/src/index.tsx +++ b/interface/src/index.tsx @@ -1,15 +1,15 @@ import React from 'react'; -import ReactDOM from 'react-dom'; - +import { createRoot } from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; import App from './App'; -ReactDOM.render( +const container = document.getElementById('root'); +const root = createRoot(container!); // createRoot(container!) if you use TypeScript +root.render( - , - document.getElementById('root') -); + +); \ No newline at end of file