Skip to main content
Alvin QuachFull Stack Developer
HomeProjectsExperienceBlog
HomeProjectsExperienceBlog
alvinquach

Full Stack Developer building systems that respect complexity.

Open to opportunities

AQ

Projects

  • All Projects
  • Hoparc Physical Therapy
  • OpportunIQ
  • Hoop Almanac
  • SculptQL

Knowledge

  • Blog
  • Experience
  • Interview Prep

Connect

  • Contact
  • LinkedIn
  • GitHub
  • X

Resources

  • Resume
© 2026All rights reserved.
Back to Blogs
Tutorial
Depth: ●●○○○

GSAP ScrollTrigger with React: Performance Patterns

How to use GSAP ScrollTrigger in React without causing memory leaks or janky animations.

Published July 30, 20251 min readImportance: ★★★☆☆
Share:

GSAP ScrollTrigger with React: Performance Patterns

GSAP is powerful but doesn't automatically clean up in React. Here's how to avoid common pitfalls.

The Memory Leak Problem

ScrollTrigger instances persist even after components unmount. Without cleanup, you'll have dozens of zombie triggers eating memory.

The Solution: Proper Cleanup

Key Insight

gsap.context() is your friend. It scopes all animations and ScrollTriggers, making cleanup a single call.