In the constructor define your ref as below. Also assign ref to div using this ref. constructor(props) { super(props); this.refTwo = React.createRef(); } <div ...
確定! 回上一頁