From 7b40bf43455846b63f27d2ffc5cac78bac1f61a7 Mon Sep 17 00:00:00 2001 From: Safdar Jamal Date: Wed, 11 May 2022 00:35:35 +0500 Subject: [PATCH] Update index.jsx - Fix: Import createRoot from "react-dom/client" --- src/index.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index dbfc23c..4046932 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,10 +1,12 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; -ReactDOM.createRoot(document.getElementById('root')).render( +const root = ReactDOM.createRoot(document.getElementById('root')); + +root.render( -) +);