chenglou / react-tween-state

React animation.
Other
1.74k stars 70 forks source link

API change for the first parameter? #16

Closed chenglou closed 9 years ago

chenglou commented 9 years ago

Instead of tweenState(function(state) {return state.a.b;}, config), maybe it's nicer to have tweenState(['a', 'b'], config) instead.

Pros: more idiomatic to immutable-js/mori. Shorter and probably slightly more intuitive. getTweeningValue looks much nicer. Cons: not google closure advanced compilation mode compatible. Less type-checkable? Does anyone care?

Will leave this here and consider it. Don't wanna randomly break the API.

chenglou commented 9 years ago

Done.