Hello, in my case the problem was when I load my react website, the initial current component which refreshes it is fine and the scroll position is also good but after we navigate to other components their I have images which load after I navigate to that component because of which scroll trigger position fails to load the right position as it doesn't refresh after the image loads.
So, what I did is in react, there is an attribute called onLoad which gets triggered after the image loads.
Hence, onLoad={()=>ScrollTrigger.refresh()} solved my problem.
same problem here, I suspected that this is happening but didn't know that `onLoad` exists, so I tried it and it worked perfectly.
So, I made an account just to thank you🙇♂️
ScrollTrigger breaks React Router?
in GSAP
Posted
same problem here, I suspected that this is happening but didn't know that `onLoad` exists, so I tried it and it worked perfectly.
So, I made an account just to thank you🙇♂️