chenglou / react-tween-state

React animation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Multiple simultaneous transitions

dey-dey opened this issue · comments

One of my main problems with CSSTransitionGroup is that it doesn't handle simultaneous transitions.

ie ...transition: left .2s ease-in-out, top .5s ease-in-out...

I suppose this takes care of it?

 this.tweenState('left', {
      easing: tweenState.easingTypes.easeInOutQuad,
      duration: 200,
      endValue: 100
 });
 this.tweenState('top', {
      easing: tweenState.easingTypes.easeInOutQuad,
      duration: 500,
      endValue: 200,
      onEnd: endCallback
 })

Yes it does. Also, there will be a better API coming soon for transitioning every values in a collection, so that'll spare you from declaring this twice =).

@chenglou thanks for the answer!