Next.js: I have a question about Link.

Created on 18 Dec 2019  路  3Comments  路  Source: vercel/next.js

Hi!
have some question about Link.

As you see in the left link. link

<Link href="/foo">
  <a>bar</a>
</Link>

I know that a link that consists only of strings should be tagged with a.
However, it violates the eslint jsx-a11y / anchor-is-valid rule. (eslint-plugin-jsx-a11y: v6.2.3)
So I tried this, and I want to know if it's ok.

<Link href="/foo">
  <a href="/foo">bar</a>
</Link>

This is because we know that Link turns to a tag when jsx is converted to html.
Do you mind if I proceed like this?

Thanks you! : )

Most helpful comment

You can safely disable that rule or proceed like this. It won't cause a problem.

All 3 comments

You can safely disable that rule or proceed like this. It won't cause a problem.

Please follow the issue template.

https://github.com/zeit/next.js/issues/new/choose

https://github.com/zeit/next.js/issues/new?template=8.Question_about_next.md

# Question about Next.js

GitHub Issues are reserved for Bug reports and Feature requests. The best place to get your question answered is to post it on https://spectrum.chat/next-js.

Please follow the issue template.

https://github.com/zeit/next.js/issues/new/choose

https://github.com/zeit/next.js/issues/new?template=8.Question_about_next.md

# Question about Next.js

GitHub Issues are reserved for Bug reports and Feature requests. The best place to get your question answered is to post it on https://spectrum.chat/next-js.

Sorry.
The next time you ask a question, I'll go to that link next time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sospedra picture sospedra  路  3Comments

rauchg picture rauchg  路  3Comments

timneutkens picture timneutkens  路  3Comments

wagerfield picture wagerfield  路  3Comments

irrigator picture irrigator  路  3Comments