Jump to content
Search Community

Scrolltrigger Scrub problem when React State changes

alvsys test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hi!

I am using ScrollTrigger in React and I am experiencing the following problem:

When I update any React State and I use scrub:1(or any number), the animation is reset and it is possible to see it jumping.

This doesn't happen when scrubis set to true

I've tried different methods available in the guides and read many forum topics but I haven't had success.

I wonder if this is possible keep the position when there is a re-render?

 

I'd appreciate any help :) 

Thanks in advance

See the Pen WNdbVZL by alvsys (@alvsys) on CodePen

Link to comment
Share on other sites

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...