gajus / redux-immutable

redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state.
Other
1.88k stars 82 forks source link

Reducer is not a function ? #49

Closed harrythedev closed 7 years ago

harrythedev commented 7 years ago

I'm getting uncaught typeError: reducer is not a function from combineReducers.js. When I check typeof reducer, it is a function.

Does anyone know why I'm getting this error?

aclave1 commented 7 years ago

@harrythedev Can you please post your code? It sounds like you're passing a single function to combineReducers, when you should be passing an object with reducers as its values. Check out the documentation for combine reducers here: http://redux.js.org/docs/api/combineReducers.html#arguments

gajus commented 7 years ago

Note that the error originates in combineReducers.js, which is part of redux-immutable, not your code base.

There can be multiple reasons why you'd get this error. One, as @aclave1 said, is if you are passing a function to the combineReduncers. It could be also if you are passing a plain object instead of Immutable.Map.