Question 1 / 1
A developer writes the following Redux reducer for the Color Organizer:
const colorsReducer = (state = [], action) => {
if (action.type === 'ADD_COLOR') {
state.push(action.color)
return state
}
return state
}
In a unit test, dispatching ADD_COLOR three times and checking store.getState().length correctly returns 3. But in the React app, the connected ColorList component never re-renders after the first dispatch. What is the root cause?