How do I access refs of a child component in the parent component

后端 未结 6 835
梦如初夏
梦如初夏 2020-11-29 23:41

If I have something like


  
  
  

And I want to access from

6条回答
  •  抹茶落季
    2020-11-30 00:25

    First access the children with: this.props.children, each child will then have its ref as a property on it.

提交回复
热议问题