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

81
Visualizações
Second .html file not recognised by javascript ft.ReactDOM

I'm still a learner and currently tweaking around with reactDom.render

I have two html files both linked to one .js file and I use getElementById to render react

Anyway my problem is that in my live server, the reactDom renders the divs in my index.html file, but ignores the other html file

I've used script linking to the .js file in both html files correctly

I cant imagine to try anything else, like it should work fine? Update - It is working when I use two seperate .js files one for each .html, but I want to manage both html files from one .js file

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

So when working with react, react sees each HTML file as an app and not just as a file so this is the reason why the functionality of one app cannot be used for another. I suggest you just use two separate .js files for your app-building.

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