title: Can't get ref from componentDidMount
body: <p>I have a class component</p>
  
  <pre><code>export default class ActivityPage extends React.Component {
     constructor(props) {
        super(props);
  
        this.textarea = React.createRef();
     }
  
     componentDidMount() {
        this.textarea.current.select();
     }
  
     render() {
        return (
           &lt;div&gt;
              &lt;textarea defaultValue="the quick brown fox." ref={this.textarea} /&gt;
          &lt;/div&gt;
        );
     }
  }
  </code></pre>
  
  <p>When I go to a route with this component, I get the following error
  <a href="https://i.stack.imgur.com/mVWoG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mVWoG.png" alt="enter image description here"></a></p>
  
  <p>I installed 16.3.2 React version.</p>