From the course: Learning Next.js (2022)
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Challenge: Pre-rendering at build vs. runtime
From the course: Learning Next.js (2022)
Challenge: Pre-rendering at build vs. runtime
(upbeat music) - [Instructor] Now, it's time for the challenge. In this chapter, we learned how to fetch and pre-render data depending on the use case. So when you build your application, next is to transform your code into production optimized files ready to be deployed to servers and consumed by users. So we have three methods of pre-rendering. First, GetStaticProps that rends at built time, GetServerSideProps that rends during request time, and also GetStaticPaths that also rends during built time and is used to generate predefined path. So let's go back to the homepage. So that's going to be actually the starter project. So you already have some setup. So the Top Stories, the Popular stories, that we know already, and you already have also the text input. And here you have an extra option, which is to navigate to a list of sections. For now, it's not set up. That's why we have a Not Found page. So the task will…
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
-
-
-