如何将道具传递给 {this.props.children} [英] How to pass props to {this.props.children}

查看:26
本文介绍了如何将道具传递给 {this.props.children}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到定义一些可以以通用方式使用的组件的正确方法:

I'm trying to find the proper way to define some components which could be used in a generic way:

<Parent>
  <Child value="1">
  <Child value="2">
</Parent>

当然,父子组件之间的渲染是有逻辑的,你可以把

发送“验证码”获取 | 15天全站免登陆