Redux Toolkit - Code splitting/ Lazy loading redux modules/ Injecting reducer

Viewed 452

Redux toolkit seems to be great. However, I am looking for options if we can inject the reducer dynamically something similar to defining-an-injectreducer-function

Use case: I am planning to do route-based lazy loading using React.lazy and thinking of initializing the redux store at run time when a particular route/ feature becomes active.

In my setup, I am planning to Redux toolkit with redux-observable as I am coming from Angular & ngRx background and feel comfortable using rxjs and redux-observable.

So, any examples of using redux-observable as middleware with redux-toolkit will be of great help.

Looking forward to the suggestion.

0 Answers
Related