title: Uncaught (in promise) TypeError: Cannot read property 'createElement' of undefined(…)
body: <p>I needed to refactor my stateless functional component to a class. When I did so though, I keep getting an error where it looks like React itself is undefined.</p>
  
  <pre><code>import React from 'react';
  import { Cell } from 'fixed-data-table';
  
  const DataCell = ({rowIndex, columnKey, data, onMessageClicked, ...props}) =&gt; {
    return (
      &lt;Cell {...props} onClick={onMessageClicked(data[rowIndex].Id)}&gt;
        {data[rowIndex][columnKey]}
      &lt;/Cell&gt;
    );
  };
  
  export default DataCell;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>import { React, Component } from 'react';
  import { Cell } from 'fixed-data-table';
  
  class DataCell extends Component {
  
    onCellClicked() {
      this.props.onMessageClicked(this.props.data[this.props.rowIndex].Id);
    }
  
    render() {
      const {rowIndex, columnKey, data, ...props} = this.props;
      return (
        &lt;Cell {...props} onClick={onCellClicked}&gt;
          {data[rowIndex][columnKey]}
        &lt;/Cell&gt;
      );
    }
  }
  
  export default DataCell;
  </code></pre>
  
  <p><code>bundle.js:43248 Uncaught (in promise) TypeError: Cannot read property 'createElement' of undefined(…)</code></p>
  
  <p>and when I go to that line I see</p>
  
  <p><code>return _react.React.createElement(</code></p>
  
  <p>I don't get it. How do I debug/fix this?</p>
  
  <p>My full code for this app is <a href="https://github.com/magician11/vensa-test" rel="noreferrer">here</a> in case the code I'm posting is not related somehow.</p>
  
  <p>Thanks!</p>