[Vuejs]-I'm confused about the way of writing props in vuecli

0👍

Is the mostrar-productos component getting [name, stock, price] as props?
receive values as props, you need to update the component as follows.

export default {
  name: 'mostrarProductos',
  props: {
    name: {
      type: String,
      default: () => '',
    },
    stock: {
      type: Number,
      default: () => 0,
    },
    price: {
      type: Number,
      default: () => 0,
    }
  }
  ...
}

Leave a comment