My case is when the user scrolls the first time, no matter whether short or long, the animation must be finished. And revert the animation when going backward.
But somehow when I scroll hard, the heading is lagging.
You can test it on a mobile device and see the difference.
video: https://drive.google.com/file/d/17V6gMXfMVGqWCzZppKC5TwgKmZBSbC_g/view?usp=drivesdk
Codesanbox link: https://codesandbox.io/p/sandbox/charming-hill-ss2m8s