rnosov / react-reveal

Easily add reveal on scroll animations to your React app
https://www.react-reveal.com/
MIT License
2.73k stars 180 forks source link

Scroll reveal animation is firing only once #149

Open burakkbilginn opened 1 year ago

burakkbilginn commented 1 year ago

I am trying to use this library on scroll revealing animations, and animate my components on every viewport Enter and on every viewport Exit both. But I couldn't find a way to trigger the animation when rereturn to the element's scroll position after scrolling away from the element to animate. I mean while scrolling, the element animates once and never again. In your documentation I couldn't find a way to achieve this. Can you help? Is there any props to achieve this? And how is the implementation if yes?

shivansh84ya commented 4 months ago

Hi @burakkbilginn,

I'd like to work on this issue. Could you please assign it to me?

For a short approach, I plan to:

  1. Investigate the current implementation of the scroll reveal animation to understand why it only triggers once.
  2. Modify the logic to ensure the animation can trigger on both viewport enter and exit events.
  3. Add or update any necessary props to allow for this behavior.
  4. Update the documentation to reflect these changes.

Thanks,