custom scrollToFn performance issue
This function below aims to reproduce a linear scroll animation, it's working nicely on high end devices but it becomes laggy on low end devices and can't figure out why.. I know this can work smoothly on low end device because without a scrollToFn and with scrollBehvaior: "smooth" the animation is smooth BUT as scroll-behavior is not linear (look like easeInOut), when we start spamming index increase, the animation goes out of hands... (even with a throttle on input)
any help would be appareciated 🙌
2 Replies
ratty-blush•2y ago
Any update on this? Thanks
passive-yellow•2y ago
Hard to say without codesandbox example