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

359
Views
¿Qué está mal en mi archivo index.js que me genera este error react-dom.development.js?

cuando reviso la consola me sale:

 react-dom.development.js:86 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. Learn more: https://reactjs.org/link/switch-to-createroot

Estoy usando "react-dom": "^18.0.0" , "react-router-dom": "^6.3.0" . Pero luego, cuando uso createRoot en mi index.js , no tengo el error, pero algunas funciones no funcionan (como este problema que tengo aquí )

Lo que tengo:

 import "./index.css"; import App from "./App"; import React from "react"; import ReactDOM from "react-dom"; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById("root") );

Lo que probé:

 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> );
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

import ReactDOM from "react-dom/client"; const root = ReactDOM.createRoot(document.getElementbyId("root") root.render(<App/>);

nunca importaste reactDOM.

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!