hzdg / gsap-react-plugin

A GSAP plugin for tweening React.js component state.
Other
130 stars 8 forks source link

Add Tween and Timeline mixins #4

Open lettertwo opened 10 years ago

lettertwo commented 10 years ago

These are React component mixins that add createTween and createTimeline functions.

They should:

matthewwithanm commented 10 years ago

Should they accept a target or should it be assumed to be the component instance?

lettertwo commented 10 years ago

hmm, not sure. using the chaining methods (like from, to, and fromTo) becomes an issue then—we'd have to implement our own wrapper with those methods that omit the target argument, i guess.

matthewwithanm commented 10 years ago

Maybe we just expose partially applied forms of those (tweenTo, tweenFrom, and tweenFromTo) in addition to the create*s? Cut down on some of the boilerplate.