Hi!
I have a timeline that is executed when a boolean is set to true. It's not particularly heavy but it does change x, width, height for a given div. When the boolean is set to false, then another timeline runs that basically reverses the changes on the same div, but to another x coordinate, that's why I needed to create a new "returning" timeline. The boolean change is detected with useLayoutEffect.
After each run the timelines start to become more and more laggy, dropping more and more frames when they are executed. I tried to optimize performance, like .kill before the timeline would run. I also tried .clear() but none of these things seem to help on the performance issue.
Do you have any ideas why I might have this behavior?
Thank you for your attention in advance.