React - Nested Components Tutorial (Childen props)

Publicado em: 18 Outubro 2023
no canal de: Austin Davis
8,065
191

If you look at React projects, you may often see React components inside other React components. This is something I call 'component nesting' which has interesting applications in React.

To nest React components, you have to use the reserved prop named children. The React children prop allows us to have parent components with an opening and closing tag, and allows us to put children component in between those two tags.

Normally to specify props you need to write propName={something} when rendering a component, but children doesn't use this same method. Instead, any component or JSX you put in between the opening and closing tags will be stored as props.children.

Watch the video for a full explanation!

If this helped you out, please consider subscribing to my channel and liking the video, as it helps out my engagement and growth tremendously! :)

Hashtags:
#reactjs #reacttutorial #reactjsdeveloper


Nesta página do site você pode assistir ao vídeo on-line React - Nested Components Tutorial (Childen props) duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Austin Davis 18 Outubro 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 8,065 vezes e gostou 191 espectadores. Boa visualização!