If you are using ReactDOM.render() in your React 18 app, you will definitely see the below issue.
ReactDOM.render is no longer supported in React 18
The reason is ReactDOM.render is no longer supported in React 18.
Earlier, we used to render the component in below way
ReactDOM.render(<NavBar />, document.getElementById('root'))
If we are using React 18, we should start using createRoot() instead of render()
The render() method of the
react-dom package is considered legacy starting
react-dom version 18.
The method is replaced with the createRoot() method that is exported from
createRoot() method takes the root element as a parameter and creates a React root.