I found this solution maybe it helps anybody
const array = ['svg-a', 'svg-b', 'svg-c'];
useGSAP(
() => {
tl.current = gsap.timeline({ delay: 1.5 });
array.forEach((item, index) => {
tl.current
.to(`.${array[index - 1]}`, {
display: "none",
duration: 0.1,
})
.to(`.${item}`, {
display: "block",
duration: 0.1,
});
});
},
{ scope: container },
);