Extract State Logic to Redux - 7/19

Tell us what’s happening:
I don’t see any error in js, the test results are Cannot read property 'type' of undefined for all the cases. What am I missing?

Your code so far

// define ADD, addMessage(), messageReducer(), and store here:
const ADD = 'ADD';

const addMessage = (message) => {
  return {
    type: ADD,
    message: message

const defaultState = [];

const messageReducer = (state = defaultState, action) => {
    case ADD:
      return [...state, action.message];
      return state;

const store = Redux.createStore(messageReducer());

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36.

Link to the challenge:

Nevermind, the issue looks like I only have to pass the function when creating the redux store, removing the () helped.

const store = Redux.createStore(messageReducer());

shouldnt messageReducer have addMessage for action, otherwise youre trying to find the type of undefined?