twobin / twobin/react-lazyload
Add API for either a `render` prop or renderprops
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 485
- PR merge metrics
- No merged PRs in 30d
Description
By conditionally rendering `children`, this library already-constructed instances of components and chooses whether to render them or not. This works for most use cases, but there are some libraries that do expensive or interesting work before mount. There's a discussion to be had about whether it's a good idea on the part of those libraries, but I want to take that as a given.
Adding a `render` prop that only executes if the lazyload conditions are met would sidestep this issue. It would also be slightly more efficient, again because the component instances wouldn't be created until the render function is executed.
Thoughts? I'm willing to do the work to add this feature.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.