Friedman
Friedman

Reputation: 77

Only want element to render when user scrolls to that section

I have this animated graph on my website that you have to scroll a bit down to get to. The animation always happens immediately meaning that no one can see it actually being made since they haven't scrolled down yet. I was wondering if there is any way to make it so that that element only appears when the user scrolls to that portion of the screen?

Upvotes: 0

Views: 133

Answers (1)

Pavan Kalyan
Pavan Kalyan

Reputation: 407

npm i react-bottom-scroll-listener

please refer https://github.com/karl-run/react-bottom-scroll-listener#readme this gives you a listener where you can set a condition and enable it

Upvotes: 1

Related Questions