Takhtak Team
Takhtak Team

Reputation: 141

React.createRef :current is null in Internet Explorer but works in other browsers

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

Answers (0)

Related Questions