Open eneadriancatalin opened 4 months ago
If you have 2 lazyload each one next to the other, when the first one is in viewpost, the second one is loaded automatically. Example:
<div> <LazyLoad ..> <Component1 /> </LazyLoad> </div> <div> <LazyLoad ..> <Component2 /> </LazyLoad> </div>
Even if I have the inside a div, when the Component1 is in the viewport, the Component2 is loaded too
Workaround: If you have some content between each then it loads when it is the viewport
<LazyLoad ..> <Component1 /> </LazyLoad> <div>Filler content</div> <LazyLoad ..> <Component2 /> </LazyLoad> <div>Some more spacer content</div>
Now Conmponent1 is loaded when it's in the viewport, and Component2 is loaded when it's in the viewport
Not sure I understand, looks like your code wasn't fully added to the issue.
If you have 2 lazyload each one next to the other, when the first one is in viewpost, the second one is loaded automatically. Example:
Even if I have the inside a div, when the Component1 is in the viewport, the Component2 is loaded too
Workaround: If you have some content between each then it loads when it is the viewport
Now Conmponent1 is loaded when it's in the viewport, and Component2 is loaded when it's in the viewport