amsterdamAL Posted February 3, 2023 Share Posted February 3, 2023 Hi, im trying to convert an existing draggable codepen to work with react. But its not working. it only works when i swipe to the left or hit the prev button, swiping next doesnt work. Also, it doesn't snap. I'm new to gsap and not sure where i'm going wrong. i omitted the timer to disable the automatic swiping to help troubleshooting. the codepen i'm trying to convert to react: See the Pen veyxyQ by osublake (@osublake) on CodePen See the Pen poZGgaj by ziploker (@ziploker) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted February 3, 2023 Share Posted February 3, 2023 Hi there, this is quite a large task. You may get some help but large tasks like this are a bit intimidating to answer as they take a lot of time. Just mentioning to manage expectations a little. If no one jumps in, there's a series of article we wrote about GSAP & React over here that may help you. 1 Link to comment Share on other sites More sharing options...
elegantseagulls Posted February 6, 2023 Share Posted February 6, 2023 Hey @amsterdamAL, One thing I noticed is that you are using some outdated GSAP plugins and code: Namely ThrowProps is now Inertia Plugin: https://greensock.com/docs/v3/Plugins/InertiaPlugin Also, no need to use "TweenLite" any more everything can be called via gsap. -- gsap.to(), gsap.set(), gsap.timeline().to().from()... etc. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now