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

219
Views
Stand-alone React 18 page warning: importing createRoot from "react-dom"

I'm trying to create a stand-alone webpage that uses React 18:

<!DOCTYPE html>
<html lang="en">
   <head>
      <title>Hello React!</title>
      <script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
      <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
      <script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
   </head>
   <body>
      <div id="root"></div>

      <script type="text/babel">
      
      const root = ReactDOM.createRoot(document.getElementById("root"));
      root.render(<h1>Hello React!</h1>);
         
      </script>
   </body>
</html>

Although the page technically works, I see this error message in the console:

Warning: You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".

I'm not sure what to change in my script tags since I'm using the suggested CDN links. I would have thought a file called react-dom-client.development.js would exist, but I don't see it:

https://unpkg.com/browse/react-dom@18.0.0/cjs/

Any suggestions?

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

0

You can ignore this warning. A fix is coming: https://github.com/facebook/react/issues/24292#issuecomment-1091690844

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!