title: Why do I get 'Cannot read property 'props' of undefined'?
body: <p>In my create-react-app/redux I have a 'connected component':</p>
  
  <pre><code>import React from "react";
  import "./App.css";
  import { connect } from "react-redux";
  
  function App() {
    debugger;
    const { datas } = this.props;
  
    debugger;
    return &lt;div className="App"&gt;{datas}}&lt;/div&gt;;
  }
  
  const mapStateToProps = state =&gt; {
    return {
      datas: state
    };
  };
  
  // const mapDispatchToProps = dispatch =&gt; {
  //   return {
  //     onRequestDog: () =&gt; dispatch({ type: "API_CALL_REQUEST_POST" })
  //   };
  // };
  
  export default connect(
    mapStateToProps,
    {}
  )(App);
  </code></pre>
  
  <p>The redux is configured in the index.js:</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import './index.css';
  import App from './App';
  import * as serviceWorker from './serviceWorker';
  import createSagaMiddleware from "redux-saga";
  import { createStore, applyMiddleware } from "redux";
  import { watcherSaga } from "./sagas";
  import { Provider } from "react-redux";
  import reducer from './redux.js'
  
  //hookup saga
  // create the saga middleware
  const sagaMiddleware = createSagaMiddleware();
  
  // dev tools middleware
  const reduxDevTools =
    window.__REDUX_DEVTOOLS_EXTENSION__ &amp;&amp; window.__REDUX_DEVTOOLS_EXTENSION__();
  
  // create a redux store with our reducer above and middleware
  let store = createStore(reducer, reduxDevTools );
  
  // run the saga
  //sagaMiddleware.run(watcherSaga);
  
  
  ReactDOM.render(&lt;Provider store={store}&gt;
      &lt;App /&gt;
    &lt;/Provider&gt;, document.getElementById('root'));
  
  // If you want your app to work offline and load faster, you can change
  // unregister() to register() below. Note this comes with some pitfalls.
  serviceWorker.unregister();
  </code></pre>
  
  <p>When I run this app I see this in the console:</p>
  
  <blockquote>
    <p>Cannot read property 'props' of undefined</p>
  </blockquote>
  
  <p>How can I debug this issue/ what is the cause of it?</p>