utopian Posted April 27 Share Posted April 27 Hi there, I don't have a codepen for this since it's more of just a question for an issue I'm debugging. We have built a website and the website uses ScrollSmoother, however we decided to build a specific part of one of the pages on the website using React. When I use ScrollTrigger on the react component it doesn't hook into ScrollSmoother which is used on the page and when I try to use ScrollSmoother.get(), it returns undefined. I was wondering how I might be able to get ScrollSmoother.get() to return the correct value when it's in the surrounding (parent) elements outside of the react components. Link to comment Share on other sites More sharing options...
Solution utopian Posted April 27 Author Solution Share Posted April 27 You can go ahead and ignore this. I realized all I had to do was export my ScrollSmoother and import it into my react component. It's fixed now. 3 Link to comment Share on other sites More sharing options...
Cassie Posted April 27 Share Posted April 27 Nicely figured out! Thanks for supporting Club GSAP too 🥳 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