Tell us what’s happening:
I’m not able to pass.
I tried: connect(mapStateToProps, mapDispatchToProps)(Presentational);
The console output is:
// running tests
ConnectedComponent is not defined
ConnectedComponent is not defined
ConnectedComponent is not defined
// tests completed
Please help to identify what went wrong…
Your code so far
const addMessage = (message) => {
return {
type: 'ADD',
message: message
}
};
const mapStateToProps = (state) => {
return {
messages: state
}
};
const mapDispatchToProps = (dispatch) => {
return {
submitNewMessage: (message) => {
dispatch(addMessage(message));
}
}
};
class Presentational extends React.Component {
constructor(props) {
super(props);
}
render() {
return <h3>This is a Presentational Component</h3>
}
};
const connect = ReactRedux.connect;
// change code below this line
connect(mapStateToProps, mapDispatchToProps)(Presentational);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.30 Safari/537.36
.
Link to the challenge: