title: Check the render method
body: <p>I am using react, redux and react-redux-router. When I run an application I get an error. I do not understand what it has to do with the render function of react in my App.js. It seems to me that problem is lying somewhere else in the code.</p>
  
  <p>The error are as follows:   </p>
  
  <pre><code> Warning: React.createElement: 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`.
   in App
   in Router (created by ConnectedRouter)
   in ConnectedRouter
   in Provider       
   Uncaught Error: 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>My javascript App file code is shown below. </p>
  
  <pre><code> import React from 'react';
   import Header from './common/Header';
   import HomePage from '../components/home/HomePage';
   import Routes from '../routes';            
   const App = () =&gt; (
     &lt;div&gt;
     &lt;Header /&gt;              
     &lt;Routes /&gt;
     &lt;/div&gt;
       )
  
   export default App;
  </code></pre>
  
  <p>my Javascript index file code is shown below</p>
  
  <pre><code> import 'babel-polyfill';
   import React from 'react';
   import {render} from 'react-dom';
   import {Provider} from 'react-redux';
   import {BrowserRouter as Router} from 'react-router-dom';
   import configureStore, {history} from './store/configureStore';
   import {loadProducts} from './actions/homeAction';
   import routes from './routes';
   import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
   import {ConnectedRouter} from 'react-router-redux';
   import createHistory from 'history/createBrowserHistory'
   import App from './components/App';    
  
    const store = configureStore();
    store.dispatch(loadProducts("http://localhost:1219/portal/getProducts"));        
   render(
      &lt;Provider store={store}&gt;
      &lt;ConnectedRouter history={history}&gt;
       &lt;App /&gt;
       &lt;/ConnectedRouter&gt;
       &lt;/Provider&gt;,
       document.getElementById('app')
    );
  </code></pre>
  
  <p>Any help would be appreciated. If you would like more detail please let me know</p>