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,500 courses taught by industry experts.
Challenge: Removing items from the cart - React.js Tutorial
From the course: Next.js: Creating and Hosting a Full-Stack Site
Challenge: Removing items from the cart
(upbeat music) - [Instructor] All right. so at this point we've pretty much completed creating the communication between our Next.js pages and the corresponding route handlers. So it's time for you to do a challenge, and that challenge is going to be to add the final piece to all of this, which is allowing users to remove items from their cart. Now, there are several places that you're going to want to do this in this application. The first is going to be on the product list page. You're going to want to actually remove the item from cart when you click on the button. And just as an aside here, I've taken the liberty of adding some styling to the buttons, so you can get that in the starting state for the files for this video. And also, you're going to want to add a button. You can feel free to use similar styles to what I added to these buttons here. You're going to want to add a button to the shopping cart page to each of these items that will allow the user to remove it from the…
Contents
-
-
-
-
-
-
(Locked)
Data loading basics in Next.js1m 13s
-
(Locked)
Loading data with Fetch5m 57s
-
(Locked)
Loading all products3m 39s
-
(Locked)
Loading individual products3m 9s
-
(Locked)
Loading shopping cart items6m 16s
-
(Locked)
Adding items to the cart10m 5s
-
(Locked)
Shopping cart improvements6m 2s
-
(Locked)
Challenge: Removing items from the cart1m 28s
-
(Locked)
Solution: Removing items from the cart5m 34s
-
(Locked)
-
-