Jump to content
Search Community

armagansnl

Members
  • Posts

    2
  • Joined

  • Last visited

armagansnl's Achievements

  1. Hello, Rodrigo, Wow, I had no idea about the useGSAP hook, thanks for sharing. I skimmed through the react docs and it seems that the combination of gsap and react has gotten a lot easier with this new hook. Is this a new feature? I was still using gsap.context for cleanups. What I meant about this part was that it is sometimes hard to find that exact moment, otherwise of course there is always an event or something. Ok, I think I need to do my homework better on these parts. Thank you for informing me about "ignoreMobileResize", it was exactly what I needed because when ScrollTrigger refreshes on mobile, it causes a short-term stutter. But when I try to use it, I get a typescript error that says; Do I need to define a specific type for ScrollTrigger? Thanks for your help.
  2. Hello everyone, I have problems with ScrollTrigger in React and Next.js ecosystem from time to time. There are times when ScrollTrigger does not update itself when the page content changes for any reason, and this causes the placement of triggers to be broken. In the solutions I encountered in the forum, it is generally recommended to run the ScrollTrigger.refresh() method after the content change, but there may not always be an event etc. that coincides with that exact moment. In short, I'm wondering if anyone can recommend a robust ScrollTrigger implementation method in CSR libraries like react or isomorphic frameworks like Next.js? Where should it be init, when should it be refreshed, is there a global solution you use for refresh, etc.? For example, I use a global resize detector when working with react and I don't have much problems, but I feel like there should be a much more logical way because when the window height changes because a new tab is opened in safari, it can unnecessarily refresh and cause jumps on the page, etc. Any suggestions would be appreciated.
×
×
  • Create New...