Jump to content
GreenSock

jltech

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by jltech

  1. Something that helped me in Reactjs was to kill all the ScrollTriggers on a page when it dismounts. In the useEffect I have to create the ScrollTriggers I am doing this: useEffect(() => { ... ... return () => { // We kill all scroll triggers so the next pages can recreate them. const triggers = ScrollTrigger.getAll(); if (triggers) { triggers.forEach((trigger) => { trigger.kill(); }) } }; }, []); Hope this helps someone.
×