【发布时间】:2018-10-24 09:39:18
【问题描述】:
我有一个 eventHandler,我希望它的兄弟组件来处理它。 <Brains /> 内部有很多属性(例如 this.randomNumber = 555 内部构造函数),onLeftLeftMove 需要这些属性来处理事件。
render( ) {
<div>
<LeftControl onTouchMove={this.onLeftMove} />
<Brains ..wants to handle onLeftMove because onLeftMove needs access to a lot of properties inside Brains.. />
</div>
}
如何做到这一点?
【问题讨论】:
标签: javascript reactjs