I'm unable to use the gsap.utils.selector to animate child components in my local React environment. The same code works in the codepen linked, but no animation is played when I run it locally. There are also no errors in the console.
I've attached my React code, the App component is the exact same but the animation simply doesn't work. index.js
Any help would be much appreciated.
See the Pen VwQWGGB by ERROR_Invalid_Syntax (@ERROR_Invalid_Syntax) o
I bet the problem is that React 18 runs in "strict" mode locally by default and in that new version, it causes your useEffect() to get called TWICE! Very annoying. It has caused a lot of headaches for a lot of people. So if you use a .from() tween, can you see how that would mess up the logic? .from() tweens use the CURRENT value as the destination and it renders immediately the value you set in the tween, so when it's called the first time it'd work great but if you call it twice, the CURRENT v