[Vuejs]-How to call a function when a competent got mount with props passed to it from parent component in vue js

0👍

To get all props passed to the component when it’s mounted you can use this.$props inside mounted lifecycle hook.

Please see src/components/Test.vue in this example: https://codesandbox.io/embed/vue-template-wzphj


You can find more information in the official documentation:

vm.$props instance property

mounted lifecycle hook

Leave a comment