How to fix recent warning “ReactDOM.render is no longer supported in React 18”.

Recently, many of you might have been getting following error in browser console when you run the react app.

Warning message on browser console:

“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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akshay Devkate

Akshay Devkate

Tech enthusiast i write blogs on Web Development and Mobile app development.