0

we have requirement for showing the transition in react and on mouse hover we have to stop the transition and when we move out the mouse it should resume?

We are able to show the transition but unable to implement pause and resume feature.

Any suggestion will help.

Thanks

Aman2211
  • 23
  • 3

1 Answers1

0

pause and resume is normally reserved for imperative api's, this isn't how declarative works. springs and transitions just reflect state just like any other component. but, you can do some damage using transitions support for keyframes, for instance you could pass a function that allows you more control. like so: https://codesandbox.io/s/ok1ywq4n6

the only other option would be to go manual all the way using the Controller class. http://react-spring.surge.sh/manual

hpalu
  • 1,357
  • 7
  • 12