[Vuejs]-VUE same component instance at difference route

0👍

You should be having <toolbar /> outside of <router-view></router-view>.

So your code should look like:

<div id="app">
    <toolbar user="user" />
    <router-view />
</div>

With this <toolbar /> won’t change even if you change your routes, and will result in data fetching for a single time only.

Leave a comment