chenglou / react-tween-state

React animation.
Other
1.74k stars 70 forks source link

Compatable with React classes. ... #28

Closed natew closed 8 years ago

natew commented 9 years ago

Removes usage of this.setState and uses property instead. Tested as a decorator as well as a mixin with createClass on my own end.

chenglou commented 9 years ago

Did you try this on many components? If you mixin this in many you'll have a shared tweenQueue won't you?

natew commented 9 years ago

My update changed it so it sets it on componentWillMount. I think on es6 classes you'd need to set it up in your constructor though

jide commented 9 years ago

How would you use this without a decorator ?

ponychicken commented 9 years ago

Maybe you could update readme.md to demonstrate the new syntax

chenglou commented 9 years ago

Btw sorry for the late reply, but I'll pick this up eventually; the API's still changing so I don't want people having to re-port this to the class syntax all the time

josebalius commented 9 years ago

@chenglou is there a plan to merge this at some point or to support ES6 classes?

chenglou commented 9 years ago

Christ, sorry for the long wait. @natew #30's shortcoming still applies here right? Needing to add tweenQueue manually?

chenglou commented 8 years ago

I'll be closing this following my explanation in #26. Thanks a lot!