You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is ReactDOM.render is no longer supported in React 18.
Earlier, react used to render the component in below way
ReactDOM.render(, document.getElementById('root'))
using React 18, we should start using createRoot() instead of render()
Example
ReactDOM.createRoot(document.getElementById('root')).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 react-dom/client.
The createRoot() method takes the root element as a parameter and creates a React root.
No description provided.
The text was updated successfully, but these errors were encountered: