#Want to use ":page-key" with elements other than "NuxtPage"

3 messages · Page 1 of 1 (latest)

velvet garnet
#

I use ":page-key" with the "NuxtPage" element. The reason is to re-render the same URL but with different query parameters.
I am using ":page-key" in App.vue, but I want to do ":page-key" for "<div>" elements in the following template, because I want to refresh it including the layout. However, I can't seem to use it on "<div>", so is there any other property I can use?

  • Template
<template>
  <div>
    <NuxtLayout>
      <NuxtPage :page-key="route.fullPath" />
    </NuxtLayout>
  </div>
</template>
inner trellis
#

Have you tried :key="xx"?

velvet garnet
#

Thank you. I’ll try. By the way there is a document about :key? I couldn’t find the document.