react-gsap-transitionable
Enables painless GSAP integration
for in/out transitions along with react-transition-group
v2
Features
- works with tweens or timelines
- can be used as decorator
- composes seamlessly (like with
react-redux
)
Installation
npm i --save react-gsap-transitionable
Usage
{ superprops } { return TweenMax } { return TweenMax } { return <div ref=this_ref>Animated!</ref> } AnimatedComponent
// With timeline, as decorator @GSAPTransition { superprops } { if !this_timeline this_timeline = paused: true this_timeline return this_timeline } { return thistimeline } { return thistimeline } { return <div ref=this_ref>Animated!</ref> }
// Use it as you would with a normal `Transition` from `react-transition-group` const HomePage _ => <TransitionGroup> <AnimatedComponent /></TransitionGroup>