I'm trying to do a reveal image effect with Greensock and React.js but i'm getting a warning related to the CSS Plugin.
First of all, i need to get the rule of the pseudo element that i want to animate for the reveal effect
const imageReveal = CSSPluginRule.getRule("#image-container:after");
And the next step is to animate the width
tl.to(container.current, 1, { css: { visibility: "visible" } }).to(
imageReveal,
1.5,
{ css: { width: "0%", ease: Power2.easeIn } }
);
The animation is not working and i'm wondering if the problem is because of this warning:
Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)