1

我正在尝试使用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}
    />
4

0 回答 0