Open klimashkin opened 7 years ago
Although it's not baked in you can achieve this with something similar to what the UI pack does here then just check once your current value reaches its destination. I know that @chenglou wanted to keep the API small and light so not sure if this feature is on the roadmap.
@souporserious onEnter
in react-motion-ui-pack is a callback when animation starts, in the same moment as willEnter.
didLeave
was added in last release, would be logical to add didEnter
as well
Definitely, I'm sure a PR would be welcome then 😀
not 100% similar, because it's whenever either enter or leave animations are triggered, but it could be used to the same effect: PR for adding onRest
to TransitionMotion
#552
Would be great to have
didEnter
on<TransitionMotion>
. For instance if user hovers menu element to show submenu (with transition), do not react on click on this hovered element until entering transition is done, to prevent accidental submenu closing (click works with hover to toggle menu dropdown and for touch devices)