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

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