From the course: Next.js: Creating and Hosting a Full-Stack Site
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Customizing content with route parameters - React.js Tutorial
From the course: Next.js: Creating and Hosting a Full-Stack Site
Customizing content with route parameters
- [Instructor] All right, so at this point we're linking each of our product list items to its corresponding Product Detail page, but we have yet to implement our Product Detail page in a way that will actually display the product that we clicked on. So what we want to happen is when we click on one of these products, all right? So let's say it's the hat here. We want the hat to show up in the Product Detail page, but if we click on the mug, we want the mug to show up in the Product Detail page. Now, this can be a little bit tricky because how do we know what product we clicked on that brought us to the Product Detail page? Well, that's where something called route parameters comes in. And here's what route parameters are going to look like. Instead of just having a generic path such as product-detail for our Product Detail page, what we're going to want to happen is when we click on one of those products, we're going to want it to go to /products, and then have another segment here…
Contents
-
-
-
(Locked)
What is Next.js?2m 48s
-
Setting up a Next.js project5m 3s
-
Creating pages5m 41s
-
Creating a product list9m 44s
-
(Locked)
Using Next.js Links3m 54s
-
(Locked)
Customizing content with route parameters8m 13s
-
(Locked)
Creating a shopping cart list8m 42s
-
(Locked)
Creating a 404 page5m 32s
-
(Locked)
Styling Next.js applications with Tailwind CSS9m 9s
-
(Locked)
Challenge: Creating a navigation bar3m 34s
-
(Locked)
Solution: Creating a navigation bar5m 34s
-
(Locked)
-
-
-
-
-