I have one auth component that I am using both in the login and the signup route.
const routes = [{
path : \'/\',
name: \'home\',
component: Home
}
You can use the key attribute to indicate vue to rerender some elements instead of reusing them.
e.g. you have an in your
Auth
component which you want to rerender under different routes, add a key
data prop to Auth
, use in the template. In your case here,
data() {
key: this.$route.path
}
may be a good choice.