Tell us what’s happening:
why when I use arrow function it will works, but when I use regular function, it doesn’t work?
Your code so far
// it works
const state = [];
// change code below this line
const mapStateToProps = state => {
return { messages: state }
}
// it doesn't work
const state = [];
// change code below this line
function mapStateToProps(state) {
return {message: state}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
.
Link to the challenge: