import React from "react";
import { ReactDOM } from "react";
import { render } from "react-dom";
const element = <h1>Hello world</h1>
render(element,document.getElementById('root'));
i tried using import { ReactDOM } from “react-dom/client”;
but still got this waring – react-dom.development.js:86 Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it’s running React 17.