Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combineReducers in child reducers #36

Closed
AnnatarHe opened this issue Jul 25, 2016 · 2 comments
Closed

combineReducers in child reducers #36

AnnatarHe opened this issue Jul 25, 2016 · 2 comments

Comments

@AnnatarHe
Copy link

Hello, I am a beginner in redux and immutable.js

I found something weird with combineReducers.

When I use redux-immutable in child reducers. The error always there.

My Code is like this:

import { combineReducers } from 'redux-immutable'
import foo from './fooReducers'
import bar from './barReducers'
import { getReducersFromOthers } from './bazReducers' // It return an Object. and it works without combine child reducers

let rootReducers = {
    foo,
    bar
}

rootReducers['others'] = combineReducers(getReducersFromOthers())

export default rootReducers
// warning.js:14 Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.

I notice that redux.combineReducers and redux-immutable.combineReducers are returned different things.

I want to know is how can I use combineReducers with child reducers.

Sorry for my English. I hope you could understand what I said.
Thanks

@gajus
Copy link
Owner

gajus commented Jul 25, 2016

Please provide a dump of getReducersFromOthers().

@AnnatarHe
Copy link
Author

Oh, I know what I missed.

I forgot to rest the result from getReducersFromOthers() last day.

I do this, and merge result to An Object. It works.
All my fault T_T
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants