Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda