-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Renderprops components are not animating in 9 beta. #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Inspired by @aleclarson 's comment #738 (comment) to another issue, I wrapped the div component with animated factory and animations are now working as expected.
Updated working sandbox: https://codesandbox.io/s/transition-in-beta-with-animated-factory-5ppzk I shall mention that the necessity to wrap components with animated factory is not mentioned anywhere in the manual about Render-props API i.e. in here https://www.react-spring.io/docs/props/transition animated factory is not used in quoted code snippets. It's also worth mentioning that everything works without animated factory in v.8 of the react-spring library. |
In v8, the renderprops API re-renders its children on every animation frame. In v9, since the renderprops API now runs on top of the hooks API, you need to use |
This "working" example is still not working, event with the latest rc. |
* Support for min/max in the TimeScale. * Min/max take same format as input data If the input data is formatted and the format property of the scale is set - exp. '%Y-%m-%d' - the min/max properties provided explicitly were not taken into account. Instead the actual range was used - this was crashing as the values `values.max` and `values.min` are already converted to native format.
🐛 Bug Report
When you use Transition, Trail, Spring components (and possibly others too) with React Spring 9 beta to animate DOM elements the animations are not applied (DOM elements do not have the style attribute applied).
To Reproduce
Expected behavior
I would expect the style attribute to be applied in a same way it works in version 8.

Link to repro (highly encouraged)
Bug example with v9.beta.31
https://codesandbox.io/s/transition-in-beta-odwx2
When you click on the Toggle Visibility button you can see the peace emoji is not animated.
Exact same example but with v.8.0.27, works as expected.
https://codesandbox.io/s/transition-in-stable-zifvq
Environment
react-spring
v9.beta.31react
v16.8.6The text was updated successfully, but these errors were encountered: