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

147
Views
My output refused to change after i changed the code in the ReactDOM.render() method in my index.js file

After running the npx create-react-app my-app, cd my-app, npm start. It launched a browser on localhost:3000. After which I opened the index.js file the ReactDOM.render() method read

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>
document.getElementById('root')
);
ReactDOM.render(
<h1> Hello, React! </h1>
document.getElementById('root')
);

The output is supposed to show Hello, React!. instead its showing the output from app.js. please I want my output to read "Hello React!"

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

0

Remove the first render... You have 2 render... Js runs from top to bottom, so it's rendering the first one

about 4 years ago · Juan Pablo Isaza Report

0

You have two ReactDOM.render, remove the first one with the component.

You will be left with this code:

ReactDOM.render(<h1> Hello, React! </h1>, document.getElementById('root'));

It should work like this.

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!