Jump to content
Search Community

Images are Flickering while animating them using scale property

shivammak
Moderator Tag

Recommended Posts

Posted

Hm, I don't see any flicker at all in Chrome. 

 

I did notice that you're using React but you're not doing proper cleanup which is a bit dangerous in React because in React 18 and above, it DOUBLE-invokes useEffect()/useLayoutEffect() in strict mode so you might be inadvertently creating duplicate/conflicting animations/ScrollTriggers. I'd strongly recommend reading this article: 

 

gsap.context() is your new best friend in React. 

 

You can also try setting will-change: transform on the things your scaling because sometimes browsers do funky stuff rendering-wise (totally unrelated to GSAP) and perhaps that's causing the flickers on your device. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...