I am currently using a vue-cli and router in my development project. I have multiple components and I need to find the best way to switch from one page to another when a user clicks on the next/previous button. Any suggestions would be greatly appreciated! Thank you!
// App.vue
<nav>
<router-link to="/">Homepage</router-link>
<router-link to="/link_1">About</router-link>
<router-link to="/link_2">Portfolio</router-link>
<router-link to="/link_3">Contact</router-link>
</nav>
<div @click="next">Go to next link</div>
<div @click="preview">Go to previous link</div>
// router/index.js
const routes = [
{ path: '/', component: home },
{ path: '/link_1', component: About },
{ path: '/link_2', component: Portfolio },
{ path: '/link_3', component: Contact },
]