[Vuejs]-Navigating vuejs SPA via routes that share component does not refresh component data as expected

0👍

For those who come this later, the following answer addresses the issue I was facing:

Vue-Router: view returning to login page after page refresh

👤Jordan

2👍

You have same component for different routes, when you go to edit route from the create route component is already created and mounted so the state of the component doesn’t clear up.

Your component can listen to route changes using $router provided by vue-router every time the route changes the watcher is called.

Leave a comment