From the course: Learning Next.js
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Handling errors with a fallback page (404 not found)
From the course: Learning Next.js
Handling errors with a fallback page (404 not found)
- With Next.js, we have a default 404 page. So it also comes with an advanced feature which is allowing us to customize the 404 page in order to improve the user experience, which is that when you land on a resource which you know does not exist, so we're going to give it a try. Actually, we are using right now, So this demonstration for the 404 page, let's make sure that we run this app on the local host 3000 and let's give it a try. So for now we can navigate from the homepage to the top stories. That's great, we can go to the popular stories. But let's try something that we know doesn't exist. We're going to land on this page, which is the default 404 page for every Next.js application. So instead what we can do is create our own 404 page. This is very important because without any specific page, this could result in increased costs, slower user experience, and overall, you never want your customers to leave your website…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Discovering the rendering strategies3m 51s
-
(Locked)
Discovering the rendering strategies with getStaticProps4m 17s
-
(Locked)
Pre-rendering at build time with static generation4m 32s
-
(Locked)
Pre-rendering super fast and super SEO-efficient content3m 17s
-
(Locked)
Discovering the rendering strategies with getServerSideProps4m 15s
-
(Locked)
Using dynamic routes and user's input to query content3m 51s
-
(Locked)
Search, request, and pre-render content with SSR2m 18s
-
(Locked)
Discovering the rendering strategies with getStaticPaths3m 47s
-
(Locked)
Pre-rendering at build time with static paths5m 9s
-
(Locked)
Handling errors with a fallback page (404 not found)2m 59s
-
(Locked)
Customizing an error page2m 16s
-
(Locked)
Challenge: Pre-rendering at build vs. runtime4m 25s
-
(Locked)
Solution: Pre-rendering at build vs. runtime8m 57s
-
-
-