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

75
Visualizações
How to update the data of child app inside parent app using Iframe

I have a react project name parent which is running on port 3000 and another project name child which is running on port 3001. In the child app, I have a counter button which I rendered it inside the parent app using an iframe. The counter is working fine but the value of the child app is not updating. However, I am calling this the parent project.

Heare is my code

parents.js

 return (
    <div className="App">
      This is Parent app

      <Iframe url="http://localhost:3001/"
        width="450px"
        height="450px"
        id="myId"
        className="childApp"
        />
    </div>
  );


Child.js

  const [number, setNumber] = useState(0)

  return (
    <div className="App">
      This is Child app
      {number}
      <button onClick={() => setNumber(number + 1)}>Click me</button>
    </div>
  );
about 4 years ago · Juan Pablo Isaza
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