DEV Community

Discussion on: Next.js - The Data Story

Collapse
 
jerocosio profile image
Jerónimo Cosío

Thanks a lot for the post, it's amazing and a lot of new learning for me. I have a question around Amplify and Next.js. How would you manage for example a flow of a shopping cart? Imagine I have 1 model for products, 1 model for shopping carta and 1 model for orders.

What would be the correct way of:

  • Checking that a product has inventory before adding it to the cart.
  • Calling an external API (Say Stripe) before creating an order.