Fetch Modules Eagerly for SuspenseList

Share this video with your friends

Send Tweet

When using the forwards option for the SuspenseList revealOrder prop, SuspenseList will only render one of the suspending components at a time as an optimization. But our components are implemented with React.lazy so they don't request the module code until late. Let's preload the module code so we get that code loading as quickly as possible.

Vadym Kalinin
Vadym Kalinin
~ 5 years ago

Thanks for a helpful tweak of an issue. I'll leave it here, in case people would like to get deeper into the thread https://github.com/facebook/react/issues/17413