JDrechsler/Quasar-with-TS-using-vue-cli-3

Hot reload refreshes whole app on property change.

Closed this issue · 1 comments

I downloaded the code and made below the changes to the app:

  1. in Home.vue, between line 2 and 3, following code is inserted:
    <q-btn>{{myData}}</q-btn>
  2. 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>
  1. in router.ts, I changed following
    {
      path: '/',
      name: 'home',
      component: Home,
      **props:{myData: 'quasar button'}**
    },
  1. npm i
  2. 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??

The behavior was due to prop change in router config. Hence closed