Hi! I'll be very appreciated if you help me figure out how to reinitialize animation by the best way using React.
I have flex containers, so when i change window height, i want my animations get new values, such as 'scrub = 3' on window size more then 600px, or 'scrub = true' otherwise, because on small height 3 seconds scrub will break animation. Also some elements wants to know actual window size for right positioning.
You see, purple square want to move directly to the middle of next section, so we set 'y' value as section height, which exactly is window.innerHeight
tlFromBot.to('#purpleSquare', {y: window.innerHeight, rotation: 360}, 0)
But window.innerHeight is dynamic value, so what the best way for smooth reinitializing values, recreate new animations or maybe somehow change values in existing animations?