Reducer is not a function (within state tree)
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
Loving the ReduxImmutable library and using it's implementation of `combineReducers` for my root state without problem. However, I have a node off the state tree called **forecast** which I'd like to further separate into a set of reducers with the following:
import ReduxImmutable from 'npm:redux-immutable';
const { combineReducers } = ReduxImmutable;
import meta from './forecast/meta';
import history from './forecast/history';
import versions from './forecast/versions';
export default combineReducers({
meta,
history,
versions
});
When I do this however, I get the message:
> reducer is not a function
From the following code block:

Any idea why this would be? For reference sake, here is the root reducer (which works so long as "forecast" is a regular reducer and not a _combineReducer_ mutex):
import ReduxImmutable from 'npm:redux-immutable';
const { combineReducers } = ReduxImmutable;
import accounts from './accounts';
import counterparties from './counterparties';
import firebase from './firebase';
import forecast from './forecast';
import org from './org';
import registration from './registration';
import users from './users';
import userProfile from './userProfile';
export default combineReducers({
accounts,
counterparties,
firebase,
forecast,
org,
registration,
users,
userProfile
});
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the nested forecast reducer entry point and the modules ./forecast/meta, ./forecast/history, and ./forecast/versions; compare their exports with the combineReducers call. Then inspect the root reducer's forecast wiring and reproduce the error, confirming done when the nested reducer accepts the expected reducer shape without the runtime message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100