Back to skills

gsap-react

development

Covers GSAP animation setup in React and Next.js using the useGSAP hook, gsap.context(), and ref-based targeting. Handles cleanup on unmount, scoped selectors, context-safe callbacks, and SSR safety.

Setup & Installation

npx skills add https://github.com/greensock/gsap-react --skill gsap-react
or paste the link and ask your coding assistant to install it
https://github.com/greensock/gsap-react
View on GitHub

What This Skill Does

Covers GSAP animation setup in React and Next.js using the useGSAP hook, gsap.context(), and ref-based targeting. Handles cleanup on unmount, scoped selectors, context-safe callbacks, and SSR safety. Works with the broader GSAP ecosystem including ScrollTrigger and timelines. Using useGSAP instead of raw useEffect eliminates manual ctx.revert() calls and prevents the animation leaks and stale-node warnings that come from skipping cleanup.

When to use it

  • Working with gsap react functionality
  • Implementing gsap react features
  • Debugging gsap react related issues