React-redux: dynamically add more reducer

Created on 22 Feb 2016  路  1Comment  路  Source: reduxjs/react-redux

Hi,
The sample code below only gives us one chance to createStore with predefined reducer(s), what if I dynamically or lazy-load other components and reducers, how can I apply them to the existing store?

let store = createStore(todoApp)

render(

,
document.getElementById('root')
)

Thanks
Gary

Most helpful comment

Hi, thanks for coming by!

This is an issue tracker rather than a support forum.
In the future please search or ask questions like this on StackOverflow.

I hope that this helps you: http://stackoverflow.com/questions/32968016/how-to-dynamically-load-reducers-for-code-splitting-in-a-redux-application

Cheers!

>All comments

Hi, thanks for coming by!

This is an issue tracker rather than a support forum.
In the future please search or ask questions like this on StackOverflow.

I hope that this helps you: http://stackoverflow.com/questions/32968016/how-to-dynamically-load-reducers-for-code-splitting-in-a-redux-application

Cheers!

Was this page helpful?
0 / 5 - 0 ratings