From 1f53fbd3beb749766d5b486fa39ae07c592aca3c Mon Sep 17 00:00:00 2001 From: evlist Date: Thu, 1 Sep 2022 18:47:36 +0200 Subject: [PATCH] Updating index.tsx to reflect changes between React 17 and 18. --- src/index.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index dd1c38f..35a930f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,11 +1,9 @@ import React from 'react'; -import ReactDOM from 'react-dom'; import App from './App'; -ReactDOM.render( - - - , - document.getElementById('root') -); +import { createRoot } from 'react-dom/client'; + +const container = document.getElementById('root'); +const root = createRoot(container!); +root.render();