twobin / react-lazyload

Lazy load your component, image or anything matters the performance.
MIT License
5.85k stars 487 forks source link

REACT-LAZYLOAD PLACE HOLDER NOT RENDER #382

Open Trung229 opened 2 years ago

Trung229 commented 2 years ago

Hi everyone,

I am trying to use react-lazyload library to optimize performance, but i get an error that it keeps returning all the data for me(it doesn't show placeholder), not wait until I scroll down to render data, i did Tried many ways but still can't fix it, hope you guys can help me

This is my code:

image

This is my DOM:

image

My react version:

Thank you

Trung

matthewsteedman commented 2 years ago

Use This package it might be better than what you currently using or trying to achieve

https://github.com/twobin/react-lazyload

Trung229 commented 2 years ago

Hi @matthewsteedman,

Thanks for your reply,

Im using this package which you say, but it gives me error like I said above

prijithvrgs90 commented 1 year ago

@Trung229 Please use this :

<LazyLoad once overflow height={200} offset={[-100, 100]} >