Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

KaranM

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by KaranM

  1. Thanks a lot for reply, This works absolutely fine and I understood that I was recreating the instance of the timeline on every toggle. After posting this question I also came around with another answer of yours on same problem, here's that link:https://greensock.com/forums/topic/21379-cant-get-reverse-to-work-in-react/ Also if possible can you shed the light on this line of code where you're using .reverse() method while creating ref, what other methodscan be possibly come here in other situations. const tl = useRef(gsap.timeline({ defaults: { ease: "power2.inOut" } }).reverse()); Thank you so much for helping me out by taking your time. You're amazing Rodrigo.
  2. Hey! GSAP community, I'm a new guy here and Loved the GSAP features. But I'm facing issue while using timeline reverse() in my react project. here is my codesandBox's Link => https://codesandbox.io/s/determined-pine..... Let me explain the issue: Problem lies In MobileNav component, when using timeline reverse method. I'm using ToggleMenu() method to change the state of isMenuOpen, and according to that executing tl.play() and tl.reverse(). tl.play() works fine but tl.reverse() not. Help Me. A comment is also added there in file where I'm facing issue Note:- Please Open the preview of website in new tab and resize around 400px as I'm using matchMedia to show different component version of Navbar, Otherwise .
×