Indi
Time Friend time-friend.com

问题 React使用router之后,以下形式会经常出现. this . props . children 可是这样渲染出来的组件,父组件如何传递props给它呢? 解决 我们可以这样传递porps给子组件: { React . cloneElement ( this . props . children ,{ A : xxx , B : xxx2 , C : xxx3 }) }…

讨论

还没有评论,来说第一句吧。

Time Friend 的其他文章