We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有点类似Vue中的slot插槽
props是我们从上个组件传值传下来的集合,react是单向数据流,每一个props都应该对应的是从上个组件传过来的值。但是这里有一个例外,那就是this.props.children
this.props.children 的值有三种可能:
React 提供一个工具方法 React.Children 来处理 this.props.children 。可以用 React.Children.map 来遍历子节点,而不用担心 this.props.children 的数据类型是 undefined 还是 Object Array
this.props.children还涉及到 回调渲染模式 后面章节会提到
The text was updated successfully, but these errors were encountered:
No branches or pull requests
有点类似Vue中的slot插槽
props是我们从上个组件传值传下来的集合,react是单向数据流,每一个props都应该对应的是从上个组件传过来的值。但是这里有一个例外,那就是this.props.children
this.props.children 的值有三种可能:
React 提供一个工具方法 React.Children 来处理 this.props.children 。可以用 React.Children.map 来遍历子节点,而不用担心 this.props.children 的数据类型是 undefined 还是 Object Array
this.props.children还涉及到 回调渲染模式 后面章节会提到
The text was updated successfully, but these errors were encountered: