This component fades in content smoothly when it enters the viewport, using requestAnimationFrame for jank-free rendering and IntersectionObserver for efficient visibility detection. It avoids layout thrashing by setting will-change and disabling conflicting CSS transitions. To use, wrap any JSX with <FadeIn>...</FadeIn>. Note: The animation is triggered only once on mount/intersection — no re-triggering on re-renders. For multiple elements, use separate instances or extend with a key-based approach.
Fade-in animation with requestAnimationFrame — react.wiki