Reputation: 141
I am trying to use React.createRef
Current code works in Chrome, Firefox, Safari, Edge
but in IE
this.calendarRef.curent
is null
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}
/>
Upvotes: 1
Views: 265