Deprecation notice: ReactDOM.render is no longer supported in React 18

ReactDom.rener is not longer supported in React 18

React 18 shipped yesterday (March 29th). ReactDOM.render has been deprecated in React18 and currently issues a warning and runs in a compatible mode.

click here to see details.

To resolve you can either revert to a previous version of React or update your index.js file to align with the React 18 syntax.

index.js

import { StrictMode } from "react";
import { createRoot } from "react-dom/client";

import App from "./App";

const rootElement = document.getElementById("root");
const root = createRoot(rootElement);

root.render(
<StrictMode>
<App />
</StrictMode>
);

For more detailed explation watch this video.

➡️ Support me

PayPal : https://paypal.me/codewitharjun

Patreon : https://www.patreon.com/codewitharjun

--

--

--

Learn Code with Fun.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

React Native Navigation

Top Tools for Vue.js Development

Working with StencilJS

Extending Angular CLI

Node.js development best practices

Check that React lifecycle methods with hooks tutorial before building your next app

Validate a form? Yup, I can do that.

Validate a form? Yup, I can do that.

Centralized authentication with a microservices gateway

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
Code With Arjun

Code With Arjun

Learn Code with Fun.

More from Medium

Single Sign On As A Service — Ongoing deployment in AWS Fargate Serverless

leetcode 162. Find Peak Element

Make Leg Day Your New Favorite Day With This 12-Minute Challenge | POPSUGAR FITNESS

CS373 Spring 2022: Griffin Urban