I am try to get the props data when mounted but I cant get it, it just return undefined. In html loaded Passdata success, so how can i get the data in script side?
sample here >>>sandbox
<template>
<img alt="Vue logo" src="./assets/logo.png" />
<HelloWorld msg="Hello Vue 3 in CodeSandbox!" />
<TestHome :PassData="PassData" />
</template>
<script>
import HelloWorldVue from "./components/HelloWorld.vue";
import TestHomeVue from "./components/TestHome.vue";
export default {
name: "App",
components: {
HelloWorld: HelloWorldVue,
TestHome: TestHomeVue,
},
props: {
PassData: String,
},
mounted(){
console.log(this.PassData);
}
};
</script>