A wrapper around react-loadable and @loadable/component to load elements once they are visible on the page.
BSD 3-Clause "New" or "Revised" License
1.01k
stars
31
forks
source link
Exposed Load method to invoke synchronous loading of component #42
Open
TrinaChoudhury opened 3 years ago
@loadable/component provides 2 methods preload and load method to load components through code synchronously. While preload doesn't return promise, load does.
On the other hand, react-loadable exposes preload method that returns promise.
The PR exposes "load" method which internally handles both the loadable libraries.