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

219
Vistas
Is there a way in React to update components on props change? (while developing at least)

I'm developing a React App using different components to layout the page. While i Work with these components I usually go back and forth changing some of their props in the code.

What I would like is that when I save the file React sees that I changed some props and rerender the component with new props. Right now I have to update the page every time and it's really annoying.

EXAMPLE I have this transform component

function Transform({size, children}) {
          return <div style={`transform: scale(${size});`}>{children}</div>
     }

And I use it in the app like this

<Interface>
    <Transform size={0.25}><Grid layout={'3x4'} /></Transform>
 </Interface>

When I change the size prop on the Transform component (just to test if I want the grid bigger) and save the file, React should reRender the component since one prop has changed and so it will appear differently. How can I set my workspace like this? Any help is really appreciated thanks! (even automatically updating the whole page would be great!)

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I would just check the size in browser dev tools and change them there then once you are happy apply those to your code IN the bottom left of the picture you see styles and then you can just type what you want. enter image description here

Edit: As OP mentioned in the comment it will only be usable if you want to change some css properties.

about 4 years ago · Santiago Trujillo Denunciar

0

This not exactly what I was looking for but I think it's even better! https://previewjs.com/

Edit: I also found that this was the solution to my original problem: Hot Reload is not working in my React App

about 4 years ago · Santiago Trujillo Denunciar
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