azazdeaz / react-gsap-enhancer

Use the full power of React and GSAP together
MIT License
726 stars 38 forks source link

ScrollToPlugin and scrollTop animation #27

Open mityok opened 8 years ago

mityok commented 8 years ago

I'm trying to animate scrollTop on react element folowing this examle from gsap. From what i was able to see it requires the use of ScrollToPlugin. is it possible to connect plugins with react-gsap-enhancer? and if so how can it be achieved

azazdeaz commented 8 years ago

Hi, the react-gsap-enhancer has nothing to do with embedding GSAP (and its plugins) so you should do as you normally do it. (Although, i have no experience with the ScrollToPlugin)

benstepp commented 8 years ago

I set up a quick create-react-app and ejected to show how to use this particular plugin with webpack. You need to alias the gsap pieces (TweenLite / Other Plugins) using webpack's resolve.alias feature.

benstepp/gsap-scrollto-example@65c53fe