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

Tim Kindberg
InstructorTim Kindberg
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 5 years ago

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
Maecee
~ 6 years ago

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

Vikas Singh
Vikas Singh
~ 6 years ago

Having trouble setting up React Router 4 with this config.

kdr1
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!

Markdown supported.
Become a member to join the discussionEnroll Today