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

135
Vistas
How to see nested react component

When I see sample react component usecase,for example following is listed. But I have questions.<App /> means some react component and it has some html element. But regarding <Theme></Theme> , it is also react component. but why this is different writing form from <App />? what is the difference between them?

    <BrowserRouter>
      <Theme>
        <App />
      </Theme>
    </BrowserRouter>

I am totally novice of React,and search them but I still have unclear about it. If someone has materials relating that. Will you please let me know

thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you define component that have children in props, you should use it as pair tag, and whatever is inside of it, its passed to props.children. In your example imagine that Theme can look somehow like this:

const Theme = ({children}) =>{
return <div style={{backgroundColor: red, color: blue}}>
 {children} //this is where <App /> is rendered in your case
</div>
}
about 4 years ago · Juan Pablo Isaza 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