Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1013 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 1013 Bytes

How To Build a Shopping Cart with Vue 3 and JSON Server [Composition API]

In this tutorial, we are building a functional shopping cart. We learn how to get cart items from fake API, update item quantity, delete item, calculate how many cart items, and Calculate total price.

Also, we will tackle core Vue 3 concepts like: Composition API 💚 script setup tag 💚 Class binding 💚 Events 💚 lifecycle hooks 💚 Vue directives: v-bind & v-for 💚 Components 💚 Props 💚 Emitted events 💚 Computed properties.

We will build a fake API using json-server package. This will help us practice doing API operations like GET, PUT, and DELETE.

YouTube tutorial

How To Build a Shopping Cart with Vue 3 and JSON Server [Composition API]

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Run JSON Server

npm run backend

Compile and Minify for Production

npm run build