DEV Community

Discussion on: 🍝 Cooking a Deliveroo clone with Next.js (React), GraphQL, Strapi and Stripe - 🛒 Shopping cart (part 5/7)

Collapse
 
gameoverwill profile image
Wilfredo PĂ©rez

Hey Ryan, it's me again. I saw a cople of thing that are not correct.

1.- the code of AppProvider.js is equal than Cart.js so that should be fixed because I'm stuck and I can't continue.

2.- Next you say "Update the _app.js and /pages/restaurants.js files to use the AppProvider/Consumer components:" but below the path is "Path: /frontend/pages/_app.js" for me that was confused.

Thanks a lot for this tutorial, I hope you fix it faster as you can and I can complete :D

Collapse
 
ryanaz profile image
Ryan

Hey Wilfredo,

Could you help me understand question #1? I am looking at AppProvider and Cart.js and it looks correct to me, am I missing something?

For #2, those are the files you will be updating to use the AppProvider. You will be moving the AppProvider and AppConsumer into those files to use the React Context API. When I write out the tutorials its difficult to write out the code being added into the file so I just try to add some context on what you will be doing. You should be able to copy/paste the whole contents of the new file into yours to get it to work