Performance Metrics - LCP #14951
-
Hey there, I started to dig into Measuring Performance and I was expecting to get the LCP (Largest Contentful Paint) right after the page was completely loaded. But instead, I got nothing printed in the console, unless I scroll or interact with the page in some way. Is this expected for LCP? I don't have anything special in my app, the only thing I have is: // app.js
export function reportWebVitals(metric) {
if (metric.name === 'LCP') {
console.log(metric);
}
}
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />;
}
// pages/index.js
export default function Home() {
return (
<>
<img src="https://www.yourtrainingedge.com/wp-content/uploads/2019/05/background-calm-clouds-747964.jpg" />
// More dummy components...
</>
)
} Demo video |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That is to be expected, per the web-vitals package that Next uses.
|
Beta Was this translation helpful? Give feedback.
That is to be expected, per the web-vitals package that Next uses.