Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Build Your First Vue.js App > Lesson 28

Replacing dummy items

In the last lesson, we've used fetch to send an AJAX request to the API.

We can see the response is an array of product objects, so in this video we'll get those into our Vue app state so that we can use them in the app.

Loading products

The first thing we'll do is delete the dummy items from the products array, as we won't need those anymore. So now, products will be initialized with an empty array.

public/script.js

Vue.createApp({
  data() {

Back to course page

Click to load comments...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom