作为React世界的初学者,我希望深入了解在使用{this.props.children}
时会发生什么以及何时使用相同的情况。在下面的代码片段中它的相关性是什么?
render() {
if (this.props.appLoaded) {
return (
<div>
<Header
appName={this.props.appName}
currentUser={this.props.currentUser}
/>
{this.props.children}
</div>
);
}
}