3 ms·
d3.transition works on element attributes not just CSS. Wish React had something like that!
by nthitz 10y ago
d3.transition works on element attributes not just CSS. Wish React had something like that!
- nathancahill 10y agoYou can do that easily with https://github.com/chenglou/react-motion https://github.com/chenglou/react-motion
- SamBam 10y agoI'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.
- nathancahill 10y agoIt 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.