What does 'Only a ReactOwner can have refs.' mean?

前端 未结 12 2578
时光说笑
时光说笑 2020-11-27 15:50

I have a simple react component with a form in it:

var AddAppts = React.createClass({
    handleClick:          


        
12条回答
  •  天涯浪人
    2020-11-27 16:23

    There is another situation.

    I set the React as external library in the webpack.config.js and import react.js from cdnjs.

    externals: {
      'react': 'React'
    }
    

    When I using an ui library depend on React,such as material-ui,react-bootstrap,this issue occurred.

提交回复
热议问题