Components always get mounted when out of view
jackkitley opened this issue · 3 comments
i just tried it and it doesn't seem to be a problem. Also the multiple render issue can't be possible because there is an example with multiple lazy components in the demo. there I would have noticed it. Please make sure that lazy components are not in the viewport at the same time. Also check values like thereshold, rootMargin. I'm closing this issue for now, ping me again in any case.
@selimdoyranli thanks for the feedback. So I got it right in the end. The components were for a brief moment all in view and then they expanded. So for that quick moment it was in view.
So what I did was set a style min height on the lazy-component and this prevented them all from being collapsed in the beginning.
The props for the lazy component didn't seem to help. Root margin and threshold