Tell us what’s happening:
Well, I floudered through React, and then Redux, barely making it through, but now I’ve gotten to React AND Redux, I’m stuck.
The criterion Dispatching addMessage with submitNewMessage from mapDispatchToProps should return a message to the dispatch function.
isn’t passing.
Any help will be appreciated.
Your code so far
const addMessage = (message) => {
return {
type: 'ADD',
message: message
}
};
// change code below this line
const store = Redux.createStore(
(state = {}) => state
);
function mapDispatchToProps()
{
return {
submitNewMessage: function(message) {
store.dispatch(addMessage(message));
}
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge: