I have created a layout.tsx
file where I included a <Link>
tag that links to the root of my application ('/'
). The <Link>
tag works fine when I use it to navigate from an existing page (e.g., /about
) to return to the home page. But when I am in the 404 page rendered by the content inside not-found.tsx
file, the <Link>
tag doesn't work properly.
Here is the link to a video that demonstrates my problem: https://www.youtube.com/watch?v=Zj-LM6FSpIk&ab_channel=AnuragNepal
I replaced <Link>
tag with <a>
tag, and the issue was fixed, but I want to learn why <Link>
tag didn't work. Your help will be greatly appreciated.