Hello there,
i'm developing a site using astro and react, and i'm facing some issues.
I have a component that uses matchmedia and a timeline with scrolltrigger to pin the component itself.
When i render two of this component, the second one sometimes starts at the first section's pin spacer start as you can see below:
Here how it should be:
I solved this delaying the adding of second component's animation to matchmedia,
setTimeout(() => mm.add(conditions, scrollAnimation), delay)
but i don't really like this solution.
In the codepen i don't have this problem.
the second issue is when i refresh the page this strange behaviour happenings:
registrazione-schermo-2023-02-18-alle-160044_qtcI2nXd.mp4
There is a way to prevent this?
Thank you all.