title: React.createRef() causing error 'expected ref to be function or string'
body: <p>I upgraded my React to 16.3.2 and used <code>React.createRef()</code> as seen here: <a href="https://reactjs.org/docs/react-api.html#reactcreateref" rel="noreferrer">https://reactjs.org/docs/react-api.html#reactcreateref</a> </p>
  
  <p>But when I am getting the following error:</p>
  
  <pre><code>Uncaught Error: Expected ref to be a function or a string.
  </code></pre>
  
  <p>When I look at what the function React.createRef() actually returns, I see this:</p>
  
  <pre><code>{ current: null }
  </code></pre>
  
  <p>What is going wrong here? Has the implementation changed?</p>
  
  <p>I am using react-router-dom for routing, and my component is a <code>class</code> component.</p>
  
  <p>EDIT: this is my code:</p>
  
  <pre><code>export class MyComponent extends Component { 
      constructor(props) {
          super(props);
  
          this.cardRef = React.createRef();
      }
  
      render() {
          return (
              &lt;div&gt;
                  ...
                  &lt;Card ref={this.cardRef}&gt;
                      ...
                  &lt;/Card&gt;
              &lt;/div&gt;
          );
      }
  }
  </code></pre>