I am following this tutorial and the instructor did something like this to explain Higher order component
const aux = (props) => props.children;
export default aux;
and then imported this to some other file and replaced div
tag with, for say <Aux>
tag.
Now, It's sort of hard for me to understand this because I am not really sure what props.children
actually do (since we hardly used it previously throughout our lectures).
I did some googling and went through an article or two on web but for some reason, their description was vey vague.
Can someone explain me the use of props.children
in general?