From the course: The Freelance Stack: Real Project with Next.js and Strapi
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Dynamic routing - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Dynamic routing
Okay, so we're going to be looking at dynamic routing now, which means we're going to be fetching even more data. And in the vein of that, one thing that I haven't mentioned before is that with the revalidation here, we might have the case where if we don't do it as an export, but instead something like this, right, where we have it in our fetch request, and let's say we don't just have one request, we might have in the same further, in the same component, might have another request where we said revalidate to five or something like that. In this case here it will always be the lowest number that actually counts and all of the requests will be made together. So it's pretty much overwritten then at that time. Okay, so just that. One other thing though is if I make the same request, right, if I also want to make the requests to posts within the same component, requests across components are being deduped. meaning just Next.js caches the data that is being read in and you're not making…
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
-
-
-
Why are we using Next.js?6m 11s
-
Setting up a Next.js project3m 52s
-
(Locked)
Simple routing in Next.js4m 11s
-
(Locked)
Layouting in Next.js5m 25s
-
(Locked)
Linking from page to page2m 56s
-
(Locked)
Server and client components overview7m 56s
-
(Locked)
Data fetching6m 7s
-
(Locked)
Dynamic routing12m 59s
-
(Locked)
Not found pages4m 55s
-
-
-
-
-
-
-
-
-
-