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.
- [Vuejs]-A unrelated vuejs app route handled by the server?
- [Vuejs]-Router Link not loading Component
Source:stackexchange.com