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.
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.