Hot reload refreshes whole app on property change.
Closed this issue · 1 comments
paritosh149 commented
I downloaded the code and made below the changes to the app:
- in Home.vue, between line 2 and 3, following code is inserted:
<q-btn>{{myData}}</q-btn>
- in Home.vue, script is changed to following
<script lang="ts">
import { Component, Vue, **Prop** } from 'vue-property-decorator';
@Component({
})
export default class Home extends Vue {
imageURL: string = 'https://pbs.twimg.com/profile_images/883473889954852864/BC5h3cmj_400x400.jpg'
stars: number = 5
**@Prop() myData?: string;**
}
</script>
- in router.ts, I changed following
{
path: '/',
name: 'home',
component: Home,
**props:{myData: 'quasar button'}**
},
- npm i
- npm run serve.
Actual: Now whenever I change the prop value in router.ts, whole page is refreshed.
Expected: Only the button text should be refreshed.
Is this due to prop set in router config??
paritosh149 commented
The behavior was due to prop change in router config. Hence closed