Easy cleanup with gsap.context()

Опубликовано: 31 Август 2022
на канале: GreenSockLearning
12,581
379

gsap.context() greatly simplifies setup and reverting of a bunch of animations/ScrollTriggers, especially for React developers!

context - https://greensock.com/docs/v3/GSAP/gs...)
revert - https://greensock.com/docs/v3/GSAP/Tw...)
3.11 Release post - https://greensock.com/3-11

revert vs kill - https://codepen.io/GreenSock/pen/JjLgPBK
vanilla context demo - https://codepen.io/GreenSock/pen/VwXovwM
context and react - https://codepen.io/GreenSock/pen/xxWRjyq
React's guidance on handling strict mode - https://beta.reactjs.org/learn/synchr...