Share Posted October 5, 2022 hello everyone, i am having trouble with scrolltrigger pin method. i seem to cannot solved is at all , cannot figure out if its reacts problem or gsap need help pleaseeeeeeeee https://codesandbox.io/s/zen-fast-ogesxo?file=/src/App.js See the Pen App.js by s (@s) on CodePen Link to comment Share on other sites More sharing options...
Share Posted October 5, 2022 Hello @chinnmay That appears to be a problem with React's StrictMode and how it handles things from React 18.0 on. You should definitely check out gsap.context(), which was added in GSAP 3.11 There is a demo for use with React on the very bottom of that docs pagehttps://greensock.com/docs/v3/GSAP/gsap.context()#react This is your example working with that. https://codesandbox.io/s/nice-darwin-bp35ve And if you want to read more about how and why the StrictMode in React 18 makes things problematic, check out this thread. 3 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