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

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…

Contents