-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make loadable.preload() return a promise #285
Comments
There is a long discussion, and the solution you are looking for - #226 |
Hello @luishdz1010, |
My bad for not looking hard enough 🤦♂️, thanks for the quick reply. |
🚀 Feature Proposal
Make loadable.preload() return a promise
Motivation
I'm implementing a "prefetcher" that will, depending on some conditions, request a bunch of known loadable components from an "index" object whose keys are strings and values loadable-components. At some point, I call preload on a bunch of these and I need a way to await on the loading promise of all components, seems like the only change necessary is to add a
return
statement at the end of thepreload()
function.Pitch
To be honest, I kind of expected this to work, I was surprised
preload()
returns undefined.The text was updated successfully, but these errors were encountered: