我正在尝试使用React.createRef
当前代码,Chrome, Firefox, Safari, Edge
但 inIE
this.calendarRef.curent
为空
constructor(props) {
super(props);
element = this;
this.state= {
allDayText: 'All day',
direction: '',
view: this.props.with,
date: new Date().toISOString().split('T')[0]
};
this.cubeRef = React.createRef();
}
componentDidMount(){
console.log(this.cubeRef);
}
<CubeContainer
ref={this.cubeRef}
/>