that is correct already. Opening a link in a new tab, is not a NextJS thing. its actually a HTML thing.
How to open a link in a new Tab in NextJS?
asked 336 days agoAsked
2Answers
94Views
How can i open a link in a new Tab in NextJS ? i tried this :
<Link href="https://twitter.com/" passHref>
<a target="_blank">
<div className={`${dark ? styles.iconTwitterWhite : styles.iconTwitter} mr-3`} />
</a>
</Link>
2 Answers
If youre using NextJs, You must utilize Next Link feature rather than using plain html <a> tag for creating link
import Link from 'next/link'
// then gamitin mo lang din parang a tas lagyan mo ng target
<Link target="_blank" href="href mo dito"> My Link Desu </Link>