Link vs router.push()?
Noob here, sorry if this is extremely basic question but I'm not sure what I should use to navigate across various pages. I'm building a single page application productivity web app. When I'm navigating to a different part in the sidebar such as home or inbox, I want to url to change to dashboard/home or dashboard/inbox, and that view to be rendered. EDIT: this all takes place client side, the page isn't reloading. there is no need for seo as the dashboard is different for each user
The question is should I use Link or router.push to achieve this?
I can either do
const navigateToHome = () => {
router.push('/dashboard/home'); // Navigate to the home page
};
onClick={navigateToHome}
OR
<Link href="/dashboard/home" className="sidebar-item"> Home </Link>
Which should I use? Thanks