1.通过ref
在子组件上添加ref
<ChildList ref="myInput"/>
然后就可以在父组件里通过 this.refs.myInput来获取了
eg:this.refs.myInput.state.name
2.通过回调函数
在子组件上添加回调
<ChildList ref={(child)=>{this.myChild = child}}/>
在父组件中通过 this.myChild调用子组件方法
eg: this.myChild.handleClick(); //调用子组件方法