chenglou / react-tween-state

React animation.
Other
1.74k stars 70 forks source link

What's the best way to listen for update after the first tween frame #46

Closed BrennanRoberts closed 6 years ago

BrennanRoberts commented 9 years ago

Sorry for the awkward title.

Let's say we're tweening opacity, and setting "display: getTweeningValue === 0 ? 'none' : 'block'". We have something we only want to call after opacity goes from 0 to >0, but since tweenState mutates state, we can't use prevState in componentDidUpdate.

Any ideas?