在下面的myfile.jsx代码中
class ButtonRenderer extends React.Component {
constructor(props) {
super(props);
}
I want to access myref which is created in main class from here
}
extend default class main extends React.Component {
constructor(props) {
super(props);
}
this.myref= react.createRef();
return
render
<input id="bla" type="text" ref={this.myref} />
}
我要访问从buttonrenderer类在主类中创建的ref