title: React+Redux: State undefined
body: <p>I am playing around with React and Redux and ran into some issues with connect.</p>
  
  <pre class="lang-js prettyprint-override"><code>const AppConnected = connect((state) =&gt; {text: state.text})(App);
  </code></pre>
  
  <p>In the first example, I get the error message <code>Cannot get 'text' of undefined</code> whereas the second example runs without problems. What is the reason behind this?</p>
  
  <pre class="lang-js prettyprint-override"><code>const AppConnected = connect((state) =&gt; {
      return {
          text: state.text
      }
  })(App);
  </code></pre>