Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
95
rated 0 times [  98] [ 3]  / answers: 1 / hits: 7023  / 2 Years ago, tue, november 22, 2022, 12:00:00

After updating Next.js to version 13, I got this client error


enter


<Link href="/contact">
<a>
Contact
</a>
</Link>

More From » reactjs

 Answers
4

To fix this error, remove the a tag from the link. From the link in the error message:



Starting with Next.js 13, <Link> renders as <a>, so attempting to use <a> as a child is invalid.



Invalid


<Link href="/contact">
<a>Contact</a>
</Link>

Valid


<Link href="/contact">
Contact
</Link>

[#11] Saturday, August 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
conorm

Total Points: 339
Total Questions: 104
Total Answers: 104

Location: Angola
Member since Tue, May 5, 2020
4 Years ago
conorm questions
;