Lazy Load Redux Reducers with Code-split Universal React Components using onLoad

InstructorTim Kindberg

Share this video with your friends

Send Tweet

When you async load a code-split component, sometimes it has associated redux actions and reducers that come bundled with it. We’ll explore a basic pattern for discovering async reducers that need to be “injected” into the redux store so that the component can function properly.

Maecee
~ 6 years ago

"Download in HD" is linked to incorrect file. Please fix

Vikas Singh
~ 6 years ago

Having trouble setting up React Router 4 with this config.

kdr1
~ 6 years ago

Unfortunately this does not work with preloadedState option passed to createStore. You would have to either pass a preloadedState with all possible async reducer keys included and stub the reducers, or produce a new store with an updated preloadedState each time a reducer is asynchronously injected. If you know of a cleaner way, I'd love to know what you know!