React.createRef: current равен NULL в Inte rnet Explorer, но работает в других браузерах - PullRequest
1 голос
/ 19 апреля 2020

Я пытаюсь использовать React.createRef
Текущий код работает в Chrome, Firefox, Safari, Edge, но в IE this.calendarRef.curent имеет значение 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}
    />
...