Subscribe on changes!

< router-view > setting the attribute (key) causes the transition to be invalid

avatar
Dec 4th 2020

Version

3.0.2

< router-view > setting the attribute (key) causes the transition to be invalid

Steps to reproduce

<section>
    <router-view :key="key" v-slot="{Component}">
      <transition name="fade-transform" mode="out-in" @before-enter="before">
        <keep-alive include="Home">
          <component :is="Component"></component>
        </keep-alive>
      </transition>
    </router-view>
  </section>
--------------------------------------------
 computed: {
    key() {
      return this.$route.fullPath
    }
  },
 methods: {
    before:()=>{
      console.log("sad")
    },
  }

What is expected?

transition is successful

What is actually happening?

router-view setting the attribute (key)
method:before does not trigger