I am playing around with React and Redux and ran into some issues with connect.
const AppConnected = connect((state) => {text: state.text})(App);
In the first example, I get the error message Cannot get 'text' of undefined whereas the second example runs without problems. What is the reason behind this?
const AppConnected = connect((state) => {
return {
text: state.text
}
})(App);