0

When I wrap my text into Link I am missing <a href in dom (but link is working).

It is good for seo? How seo robot know that there is a link?

import Link from 'next/link'
.
.
.
<Link href="/about">
  About us
</Link>

Dom in browser:

About us

Excepted dom in browser (from my side):

<a href='/about'>
About us
</a>

1 Answer 1

1

You need to add the a tag. From documentation:

import Link from 'next/link'

function Home() {
  return (
    <ul>
      <li>
        <Link href="/">
          <a>Home</a>
        </Link>
      </li>
      <li>
        <Link href="/about">
          <a>About Us</a>
        </Link>
      </li>
    </ul>
  )
}

export default Home