Eileen Fürstenau

Next.js Unleashed: Optimizing Web Vitals for superior User Experience

A simple wine shuffler app scored a dismal 52 on Lighthouse. See the step-by-step Next.js optimizations that skyrocketed its performance to a near-perfect 99.

Next.js Unleashed: Optimizing Web Vitals for superior User Experience
#1about 2 minutes

Building a wine app and discovering its poor performance

A sample wine recommendation app built with Next.js reveals a low initial Lighthouse performance score of 52, prompting an investigation into optimization.

#2about 4 minutes

Explaining the importance of Core Web Vitals

Core Web Vitals like LCP, CLS, and INP are defined as key metrics for measuring user experience, loading performance, and visual stability.

#3about 4 minutes

An overview of Next.js and its optimization capabilities

Next.js is introduced as a React framework with built-in features like server-side rendering and static site generation that aid performance.

#4about 3 minutes

Improving performance with the Next.js Image component

Replacing the standard HTML `<img>` tag with the Next.js `<Image>` component automatically handles resizing, modern formats like WebP, and lazy loading.

#5about 4 minutes

How to efficiently load custom fonts in Next.js

The built-in font optimization in Next.js eliminates extra network requests by inlining font CSS at build time, improving load performance.

#6about 4 minutes

Using dynamic imports for modules and components

Defer loading of non-critical JavaScript for third-party libraries and React components by using dynamic imports to reduce the initial bundle size.

#7about 2 minutes

Managing third-party scripts with the Script component

The Next.js `<Script>` component provides control over when third-party scripts are loaded and executed to prevent them from blocking page rendering.

#8about 2 minutes

Achieving a near-perfect score after optimizations

After applying several Next.js optimization techniques, the application's Lighthouse performance score improved from 52 to 99.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.

Lead Full-Stack Engineer

Lead Full-Stack Engineer

Hubert Burda Media
München, Germany

80-95K
Intermediate
Senior
React
Vue.js
Node.js
MongoDB
+1
Angular Developer

Angular Developer

Picnic Technologies B.V.
Amsterdam, Netherlands

Intermediate
Senior
RxJS
Angular
TypeScript
Full Stack Engineer

Full Stack Engineer

Climax.eco
Rotterdam, Netherlands

70-100K
Senior
TypeScript
PostgreSQL
Cloud (AWS/Google/Azure)