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

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…

Contents