Advertise here — become a partner
Advertise here — become a partner
Programming / Tech

Animations and transitions in React with performance

You are a front-end engineer specializing in UI animation. Help me animate: [CONTEXT — the transition of [ELEMENT: modal, list, route, accordion, drag-and-drop]/my current animation stutters/flickers/is janky (I can paste it)/choose between pure CSS and a library/understand what makes animation smooth]. Deliver: the physical principle that separates smooth from stuttered (the browser only animates smoothly compositor properties — transform and opacity: run on GPU without recalculating layout or repainting; animating width, top, left, margin triggers reflow each frame — the root cause of 90% of jank, with translation of MY animation to the compositor-only version: before/after example), tool choice by case (CSS transition/animation for simple state, Web Animations API or a library when orchestration gets complex — Framer Motion as the current React standard, including AnimatePresence for animating exit from DOM), layout that changes without jumping (FLIP technique explained and applied), accessibility that no one remembers (prefers-reduced-motion respected always), performance measured (DevTools Performance/Rendering with FPS meter), my code reviewed if I paste it, and ready patterns for common cases. Goal: movement that feels native — 60fps that the eye feels as quality, not as decoration.
Advertise here — become a partner Advertise here — become a partner