Hi,
Here there is my code : https://codesandbox.io/s/gsap-with-react-n23k7h?file=/src/index.tsx
I'm following a tutorial written in JS Vanilla with GSAP, but i need to use it on React so i transform all the code. Of course all work's great, like expected.
But i don't know if there is a better way to write that. For example inside the components "InputContainer" (/component/form/input/inputContainer):
1. i push all the '.input-container' inside the revealRefs array, instead of querySelectorAll ( i also tried the utility 'selectors' but it doesn't work, maybe because this container is inside a map loop, don't know)
2. Then inside the useEffect i loop revealRefs, and inside the forEach i needed to use querySelector if i wanna select all the input's
There are similar example in the code, but if i refactor one component, the others are the same.
So there is a better way to handle that?
Thank You??