From 7b70940e8eb2bc3fced6df494b09b60e21ae28de Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Tue, 20 Feb 2024 01:11:38 +0000 Subject: [PATCH] client: switch ReactDOM.render to createRoot --- client/src/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/index.tsx b/client/src/index.tsx index c9d066c..6b7cbb5 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -1,9 +1,11 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import './index.css'; import App from './App'; const initialRoom = window.location.hash ? window.location.hash.substr(1) : ''; -ReactDOM.render(, document.getElementById('root')); +const container = document.getElementById('root')!; +const root = createRoot(container); +root.render();