react-spring icon indicating copy to clipboard operation
react-spring copied to clipboard

re-add onDelayEnd function

Open iMoses-Apiiro opened this issue 4 years ago • 7 comments

🐛 Bug Report

The title says it all, but for reference: https://github.com/pmndrs/react-spring/commit/f8a54c5c6ed66b1e4c02bfff152e40ce8470f967

Why was it removed?

And why isn't the documentation updated to remove the event reference...

Environment

  • react-spring v9.2.3

iMoses-Apiiro avatar Jun 22 '21 09:06 iMoses-Apiiro

Not sure why it was removed, it probably shouldn't be in the documentation, if you want to make a PR in the react-spring.io project to amend said documentation that would be really helpful

joshuaellis avatar Jun 22 '21 09:06 joshuaellis

I'd much rather add back the missing functionality :sweat_smile:

I'm currently struggling very hard to come up with an alternative and it seems i'm gonna have to manage the delay myself just so I could trigger a state change when an animation begins

iMoses-Apiiro avatar Jun 22 '21 10:06 iMoses-Apiiro

Well you're also totally welcome to make that PR to add the functionality, Alec no longer works on the project, and the lack of message on that commit basically means we'll never know why it was removed.

joshuaellis avatar Jun 22 '21 10:06 joshuaellis

@iMoses-Apiiro I've added enhancement label so we can hope to bring this back one day.

joshuaellis avatar Jun 23 '21 09:06 joshuaellis

dump .... tryied to fork & revert refactor: remove onDelayEnd prop commit, but there are too many changes :(

ps: any other means for checking if animation should start when delay expires? (mouse enter: start animation with delay, mouse leave: cancel animation if not started yet, revert if in progress)

CzBuCHi avatar Aug 05 '21 08:08 CzBuCHi

I was confused by this as well. From what I can tell, onStart does the thing I want (fires when delay ends and movement begins).

If that's true, would be good to update the docs.

If it's not, clarifications/corrections welcome!

ryan-williams avatar Apr 15 '22 15:04 ryan-williams

Similar question. I saw an onResolve method on the type definition, but there is absolutely nothing about it in the official website documentation?

cangSDARM avatar Apr 25 '22 10:04 cangSDARM