react-gsap-enhancer icon indicating copy to clipboard operation
react-gsap-enhancer copied to clipboard

ScrollToPlugin and scrollTop animation

Open mityok opened this issue 8 years ago • 2 comments

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

mityok avatar Oct 11 '16 20:10 mityok

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)

azazdeaz avatar Oct 11 '16 21:10 azazdeaz

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

benstepp avatar Oct 12 '16 00:10 benstepp