Hacker News new | past | comments | ask | show | jobs | submit login

d3.transition works on element attributes not just CSS. Wish React had something like that!



You can do that easily with https://github.com/chenglou/react-motion


I've played with ReactMotion, but I was under the impression that it was only for styles, not for arbitrary component attributes.

In the Readme they say the `style` property is required, and they also don't show any examples of animating something other than style.


It gives you a continuously changing variable that you can use for whatever you want. The name style is confusing, because it isn't actually a style. In the very first example it's just displaying the changing value.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: