Post page template
Get the project source code below, and follow along with the lesson material.
Download Project Source CodeTo set up the project on your local machine, please follow the directions provided in the README.md
file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.
You can find the working example for this lesson in the
code/05-next-ssg/05.11-post-page-template
folder.
In our first take on this page, we won't render any content. Instead, we will ensure that we can get an ID of a post in order to load it from the server later.
To create a page that is responsible for a path with dynamic route segment, we should add brackets to the page's file name.
In our case, a new file will be called [id].tsx
and located in the pages/post
directory:
This lesson preview is part of the Fullstack React with TypeScript Masterclass course and can be unlocked immediately with a single-time purchase. Already have access to this course? Log in here.
Get unlimited access to Fullstack React with TypeScript Masterclass with a single-time purchase.