Share Posted January 25 Hello Everyone! sorry for my english. Ok , so im trying to use React-locomotive-scroll together with gsap Scrolltrigger. I set up my scrollerproxy component and inserted it into my app and averything seems fine (console is not showing any errors). But when i use scrolltrigger in to my Home page my animation target doesn t change. But when i resize my screen the animation starts. Did anyone came in to this problem before? I left attached will leave my APP, HOME and SCROLLERPROXY code pics to make it clear. Thanks and i hope someone can help me Link to comment Share on other sites More sharing options...
Share Posted January 25 Hi @Gonza Bordes and welcome to the GreenSock forums! Honestly I've never used Locomotive in any setup so I don't have a clear idea of how it actually works. I'd recommend you to take a look at this thread as it seems that the user there was able to integrate it successfully: If you keep having issues please remember to include a minimal demo. You can fork this example and include locomotive there in order to see what could be the problem: https://stackblitz.com/edit/react-cxv92j?file=src%2FApp.js Happy Tweening! Link to comment Share on other sites More sharing options...
Share Posted January 25 Hello all, I hate to be the party-pooper and if I am wrong with this, or out of line, I beg your pardon, but I just wanted to mention that using the approach in the thread, that @Rodrigo mentioned might not be the best idea, since it appears to be rather problematic for a couple of reasons mentioned in this other thread by the same user from a couple of days later. Now again, I really don't want to call out anybody, but I also wouldn't suggest their approach as a solution (at least for the time being), so I thought this was worth mentioning. Might be worth also making a note of that in the thread where the use of that hook is suggested? 1 Link to comment Share on other sites More sharing options...
Share Posted January 25 Hey Paul, No need to apologize for anything. Actually thanks for pointing out possible issues with the suggestion in my last post and the linking another thread for such issues. It definitely seems like a good idea moving forward to have a basic example of Locomotive with ScrollTrigger on React. 1 Link to comment Share on other sites More sharing options...
Share Posted January 25 I was just tinkering with the custom hook solution by the other user, and think I found all the causes of problems now - am just about to reply there with the sandbox I've landed on. Give me a second. 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 25 Wow, really productive replies. Thanks to you all. Looking foward to that sandbox @akapowl Link to comment Share on other sites More sharing options...
Share Posted January 26 You can find it in that other thread I mentioned earlier. 1 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