[Vuejs]-Vue3 props access inside setup() returns nothing

0👍

This means that product is reactively updated after the creation of component instance.

Updated value is supposed to be accessed in a watcher or a computed. In case a side effect like logging is needed, this is the case for a watcher:

  setup(props) {
    watchEffect(() => {
      if (props.product.makers)
        console.log(props.product.makers)
    });
  },

Leave a comment