[Vuejs]-Vue – force update on new id in URL

0👍

Referring to Dan’s link in his comment above, it was the clue I needed. I was able to get my body component to re-render even if only the URL parameter changed. The code below injects that main body component into the view area of my SPA and attaches the footer component below it:

<template>
  <v-main>
    <router-view :key="$route.fullPath" />
    <c-v-footer />
  </v-main>
</template>

<script>
  export default {
    name: 'CVView',
    components: {
      CVFooter: () => import('./CVFooter'),
    },
  }
</script>

My original code did not include the :key=$route.fullPath prop, and the main body component would not re-render if only the URL parameter changed.

Leave a comment