Binding the Shopping Cart Collection to the App Component

Learn how to initialize and bind the shopping cart collection to the App component in Vue.

Initializing the shopping cart collection

Let’s start our application by updating our App.vue component. The App component will just be the entry point to our application and will hold the collection of items that are in our shopping cart. For the purposes of this application, we will just create a static set of items in a file named CartItems.ts as follows:

Get hands-on with 1200+ tech skills courses.