Need help with resolving CLS issue

using pagespeed.web.dev to measure my site performance, how do I fix CLS that's happening in my main layout div? How do I find what's causing it??
No description
14 Replies
Tenkes
Tenkes17mo ago
Have you checked that Learn how to improve CLS link?
croganm
croganm17mo ago
Is it animating or something? It's saying the main tag is the culprit, which is very odd. Makes me think some animation is ocrruing Normally it tells you a specific element that is at fault
DooMGuY086
DooMGuY086OP17mo ago
animation occurs to load sections, which are inside the main div
croganm
croganm17mo ago
That definitely could be the cause....any chance you could screen record or something the first load? I've had animations tank my CLS in my hero section before. Turned them off and it fixed it dramatically.
DooMGuY086
DooMGuY086OP17mo ago
DooMGuY086
DooMGuY086OP17mo ago
getting this but its too vague
No description
vince
vince17mo ago
Do you have a git repo or something so we can check it out?
croganm
croganm17mo ago
Also, do you have a live site? Animations on load like that can indeed kill CLS A github repo would be nice as well. Did you build this in HTML/CSS?
DooMGuY086
DooMGuY086OP17mo ago
Dhruv Kulkarni's Portfolio
Hi, I'm Dhruv Kulkarni - Welcome to my portfolio website
DooMGuY086
DooMGuY086OP17mo ago
nextjs MUI it's private so can you drop your github username I'll add you as a collab
croganm
croganm17mo ago
Unfortuantely I can't test this without running a development version of my site but you need to check out the react profiler. There are some major long running task in your react page causing these long load times. It's why you get that weird jump from at the very beginning with all your content
croganm
croganm17mo ago
No description
croganm
croganm17mo ago
You can look up react dev tools on the chrome store and you'll see it pop up. Here's also a video on it: https://www.youtube.com/watch?v=Qwb-Za6cBws
Web Dev Simplified
YouTube
How To Maximize Performance In Your React Apps
React Simplified Course: https://reactsimplified.com Fixing performance bugs in React is difficult since so much of the performance of React is tied to re-renders and state management. This is why I love the profiler built into React dev tools since it does an amazing job of showing you everything you need to know about what is causing your app...
croganm
croganm17mo ago
Also could look at inlining critcal styles and things of that nature
Want results from more Discord servers?
Add your server