父组件:
<Child onRef={(ref) => { this.child = ref; }} />
用的时候直接从this.child里面取
子组件:
react父组件获取子组件的值或方法
原文:https://www.cnblogs.com/hamili/p/12017962.html