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

138
Visualizações
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 Respostas
Responde à pergunta

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 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