Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

79
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda