Jump to content
Search Community

lt852

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by lt852

  1. Wrapping the scrolltrigger pin in a div didn't work for me as it seemed to change the scrolltrigger progress values?
    Killing scrolltrigger on useEffect/useLayoutEffect unmount also didn't work.
    What worked was manually triggering kill() before unmounting the component. 
    So something like this...
     

        const backBtnPress = () => {
            animationsRef.current.menuFadeIn.vars.onReverseComplete = () => {
                sTrigger.current.kill();
                setNav('more')
            }
            animationsRef.current.menuFadeIn.reverse()
        }

     

    • Like 1
    • Thanks 1
×
×
  • Create New...