Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
React Confirm Alert library showing "Warning: ReactDOM.render is no longer supported in React 18."

I'm trying to use the react-confirm-alert library for a confirmation dialog. But it's giving me a warning when the confirmation pop-up is opening for the react version upgrade. "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." Is there any way to get rid of the warning? Or is there any good alternative library that I can use for a confirmation dialog?

Thank you!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try this:

import ReactDOM from 'react-dom/client';

then

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);

It will work

about 4 years ago · Juan Pablo Isaza Report

0

Probably your answer must be:

Try this in your index file:

import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";

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

root.render(
        <App />
        );

This works in latest react version.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!