Company
Date Published
Author
Ryan Belke
Word count
2098
Language
English
Hacker News points
None

Summary

The tutorial, updated by Fredrick Emmanuel and Paul Bratslavsky, is part of a series focused on creating a Deliveroo clone using Next.js, GraphQL, Strapi, and Stripe. It guides users through setting up a Strapi project and integrating a shopping cart feature using React Context API to manage state across different pages without prop drilling. The tutorial explains how to update the AppContext.js file to manage cart functionalities like adding, removing, and resetting items, and emphasizes the importance of storing cart data in cookies to preserve it through page refreshes. By utilizing Apollo Client and Next.js dynamic imports, it sets up a system to display restaurant dishes fetched via GraphQL queries, while allowing users to add these dishes to a cart component. The cart system is further integrated into the layout of the app, updating the navigation bar with user login information and providing functionality to log out. The tutorial concludes with a preview of the next steps, which involve setting up Stripe for payment processing and completing the order workflow.