Monday, 16 May 2016

javascript - Does React property spread notation also pass on children?

Does the React property spread notation in this return statement...



render() {
return (

);
}



... also provide the Alert component with all the children passed to the current component which owns the above render() method?



Or would I explicitly have to provide the children like this?



render() {
return (
{this.props.children}
);
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...