5168 shaares
38 private links
38 private links
The core of React is components. You can nest these components like you would nest HTML tags, which makes is easy to write JSX since it resembles markup.
When I first learned React, I thought “Use props.children and that’s it. I know everything about children” Boy, was I wrong.
Because we’re working with JavaScript, we can change children. We can send special properties to them, decide if we want them to render or not and generally manipulate them to our will. Let’s dig into the power of children in React.