I'm learning Vue coming from React, and wondering what the correct way to persist a navbar is - i have navigation on there with router links.
I have a navbar component with router-links which works, but it is reloading when heading to another route. Is there a way to persist it "outside" of the body components? Such as it isn't re-rendered when heading to a new route?
I tried putting it outside the router-view, but it does not render anywhere:
<template>
<div id="app">
<topnavbar>
</topnavbar>
<router-view>
</router-view>
</div>
</template>
Same if it goes inside.
How do I persist the navbar? Should it be the parent of all components that go into the router, or what is best practice?