Thanks for your responses guys. I did add a cleanup/Scrolltrigger.kill() to my useEffect but it did not fix the issue.  What does seems to have worked is adding a Scrolltrigger.refresh() in that useEffect. Not sure how that will impact performance though.   useEffect(() => { gsap.registerPlugin(ScrollTrigger); const target = targetElement.current; animation(target); ScrollTrigger.refresh(); }, [animation]);