react中ref转发(React.forwardRef)
父页面:
import React from 'react';
class App extends React.Component {
constructor(props) {
super(props)
this.state = {}
this.myRef = React.createRef()
}
handFun = (e)=>{
console.log(this.myRef.current)
// console.log(e)
}
re
原创
2020-06-09 21:15:43 ·
754 阅读 ·
0 评论