Value for mapStateToProps

In writing the mapStateToProps function, state is the argument. How it is used seems lke it would be state.messages, but the way it works is state. Why not state.messages?

{messages: state.messages}
{messages: state}
 Code so far  

//Map State to Props
const state = [];

// Change code below this line
let mapStateToProps = (state =>
{
 return {messages: [state.messages]};
}
);

Link to the challenge:

state the variable is being returned.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.