From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Polishing the dynamic post pages
From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Polishing the dynamic post pages
All right, so we went through quite a bit. Title, ID, date, and we're setting everything up with getStaticProps, which is taking the params ID for this post data and is then retrieving that information for our function post. And this all happens with the getPost data, which we created in our helper functions over here. So this ID takes in the params and then we get the params. So the parameters passed to the getsDataProc functions are determined by the paths that are being generated here, getAllPostIds, all right? All right, so we should have the page up and running, and we see all the post data logs are even coming out over here with the IDs. Let's actually, if we go back to here, let me see, so you can see here. This is in the pre-rendering. If we go back to one of these posts, like pre-rendering, let's actually polish up our post page, and then we can polish up the home page. We'll go back into the ID component that we have here with the function post. And we're going to use the…
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
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
How to create dynamic routes with Next.js7m 15s
-
(Locked)
getStaticPaths with Next.js implementation5m 14s
-
(Locked)
Mastering dynamic static rendering with Next.js12m 3s
-
(Locked)
Rendering markdown and security vulnerabilities with injected HTML11m 23s
-
(Locked)
Polishing the dynamic post pages10m 43s
-
(Locked)
Polishing a Next.js component with styling7m 22s
-
(Locked)
Fetching data and database querying plus ISR with Next.js11m 26s
-
(Locked)
API routes with Next.js9m 1s
-
(Locked)
-