title: Error in App class when using React-Redux "connect "
body: <p>I am receiving the following error when trying to use the <code>connect()</code> function from <code>react-redux</code>:</p>
  
  <pre><code>Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
  
  Check the render method of `App`.
  </code></pre>
  
  <p>This is App:</p>
  
  <pre><code>import { Provider } from 'react-redux';
  import configureStore from './store';
  const App = class extends React.PureComponent {
    render() {
      const { title } = this.context;
      return (
        &lt;div className="center-screen"&gt;
          {title}
          &lt;Provider store={configureStore()}&gt;
            &lt;Chat /&gt;
          &lt;/Provider&gt;
        &lt;/div&gt;
      );
    }
  };
  </code></pre>
  
  <p>This is the relevent code end of chat:</p>
  
  <pre><code>import { connect } from 'react-redux';
  
  
    ...
  
  
      const mapStateToProps = state =&gt; ({
    ...state
  });
  const mapDispatchToProps = dispatch =&gt; ({
    addMessage: () =&gt; dispatch(addMessage)
  });
  
  export default connect(
    mapStateToProps,
    mapDispatchToProps
  )(Chat);
  </code></pre>
  
  <p>When using : "export default Chat" instead of connect, it's working fine..</p>