0π
- I donβt think "loading" is correct word here. Code needed for component is loaded from server only once as you can check in Dev Tools Network tab
- When switching routes, component for old route is destroyed and component for new route is created. Its default behavior of Vue dynamic component (it is what
<router-view>
uses for switching components). You can change that by using<keep-alive>
. Be sure to check documentation and understand implications β your app will use more memory
<keep-alive>
<router-view :key="$route.fullPath"></router-view>
</keep-alive>
Source:stackexchange.com