Jump to content
Search Community

Rayan Boutaleb

Business
  • Posts

    4
  • Joined

  • Last visited

About Rayan Boutaleb

Rayan Boutaleb's Achievements

  1. Hello @GreenSock @Rodrigo, and thanks for looking into this ! First approach makes sense, I although did try locally to have the length as a parameter but that didn't help it (using useEffect, so maybe by using useGSAP it will work nicely ) Sounds good for next release, thanks a lot for the quick fix and taking a deeper look into this little edge case ! I'll probably do a combination of all approaches, swap out useEffect for useGSAP solution everywhere and use the scrollTrigger beta version Thanks again, will give it a go and mark as resolved once I get it running perfectly !
  2. I gave it a go in the stackbliz starter you sent, but unfortunately the issue is persisting https://react-p86nkh.stackblitz.io
  3. Oooh I did hear there was some gsap hook but I never realised it was a solution to some existing problems; will give it a try and will let you know !
  4. Greetings ! I'm building a slider that is destined to be modified in terms of items quantity. I made a fairly simple setup for this slider to work and, without re-rendering, it works as expected. The problem comes when adding/deleting items in this slider, the snapping stops working, although I am re-building the whole logic on length change, and of course, after reverting the context on react's useEffect's `return` A pile of code will be more obvious to show what is tried to be achieved, so find my codepen hereby. Reproduction: - Slide the slider to see snapping work and fit to "current slide" - Click top left button to add an item - See re-rendering happen - Slide again in the slider - Snapping doesnt work. I ran out of ideas of how I could possibly fix this, or work around it. Any help is welcome ! Thanks
×
×
  • Create New...