react-spring
react-spring copied to clipboard
skipAnimations breaks enter defined as function
🐛 Bug Report
When Globals.assign({ skipAnimation: true });
is used, an useTransition defining enter
as a function will not have those changes applied, while one providing the same change as an object works fine.
To Reproduce
- Add an transition to a component with the
enter
prop set to a function (e.g.enter: () => async next => await next({opacity: 1})
) - See it work
- Set
Globals.assign({ skipAnimation: true });
- See the transition no longer applying the styles.
Expected behavior
Have the end result be the same as when skipAnimation
was false
Link to repro (highly encouraged)
https://codesandbox.io/s/awesome-vaughan-bdwcr
Has two components, one using a function enter, the other an object enter. Both work the same with skipAnimation
false, the one using a function stops working when skipAnimation
is true.
Environment
-
react-spring
v9.1.1 -
react
v17.0.2
Hi there, I see this was removed from the 9.4.0 milestone a year ago and has been stale since. This issue prevents easily disable springs globally when users prefer reduced motion, as well as means spring animations have to run in realtime when testing in a pipeline. Is there any plan for picking this up in a coming version? Thanks
Is there any plan for picking this up in a coming version
As a one person development team, I'm afraid to say no there isn't a plan to pick this up in the near future. ofc, anyone is welcome to submit a PR 😄