Jump to content
Search Community

jltech

Members
  • Posts

    1
  • Joined

  • Last visited

Contact Methods

jltech's Achievements

3

Reputation

  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.
×
×
  • Create New...