Hello,
I need to set my react state inside my timeline after first animation ends and then continue with animations:
const tl = gsap.timeline();
tl.to(pTitle, 1.5, { x: -550 }).setNewState after previous animation.to(pTitle,1.5,{x:150})
so far I could achive it with that:
tl.to(pTitle, 1.5, { x: -550 }).add(
setTimeout(() => {
//setNewState
}, 1500)
).to(pTitle, 1.5, { x: "-4%" });
is this proper way of implementing this? Or is there "smoother" way of achieving it like with delayedCall() - which is not available in timeline