This PR fixes a jump in optimised appear animations when useLayoutEffect triggers a state update leading to a layout animation.
By moving CancelHandoffAnimations to before the snapshot is taken, not only do we fix the snapshots but also the cancel is skipped currently in Framer as no layout animations are detected on this mount re-render, leaving the smoother animation in tact.
This PR fixes a jump in optimised appear animations when
useLayoutEffect
triggers a state update leading to a layout animation.By moving
CancelHandoffAnimations
to before the snapshot is taken, not only do we fix the snapshots but also the cancel is skipped currently in Framer as no layout animations are detected on this mount re-render, leaving the smoother animation in tact.