Skip to content

fix: animation stutter#23

Open
rizkymashudi wants to merge 7 commits intomainfrom
fix/animation-stutter
Open

fix: animation stutter#23
rizkymashudi wants to merge 7 commits intomainfrom
fix/animation-stutter

Conversation

@rizkymashudi
Copy link
Copy Markdown
Owner

No description provided.

…-renders

useScrollProgress now uses a ref + onProgress callback instead of
useState, preventing ~240 React re-renders/sec across 4 sections.
Layout values (offsetTop, offsetHeight) are cached and only
recalculated on resize.
Eliminates getBoundingClientRect per-card per-frame by computing
card positions from translateX offset and cached widths. All DOM
writes now happen directly in the rAF loop.
Cache heroH, isMobile, and heroRect on resize instead of reading
offsetHeight, innerWidth, and getBoundingClientRect every frame.
Prevents first-frame stutter caused by the browser promoting
elements to compositor layers mid-animation.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 15, 2026

Deploy Preview for rizkym ready!

Name Link
🔨 Latest commit 4de4a70
🔍 Latest deploy log https://app.netlify.com/projects/rizkym/deploys/69defa51da233e0008f2f624
😎 Deploy Preview https://deploy-preview-23--rizkym.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant