freeCodeCamp Challenge Guide: Map State to Props

Map State to Props


Solutions

Solution 1 (Click to Show/Hide)
const state = [];

// change code below this line
const mapStateToProps = (state)=>{
  return {
    messages: state
  }
}
2 Likes