I'm using next 13.4.4 with app router. I've added not-found.tsx component to app directory, basically just copied code from next documentation:
import Link from 'next/link'
export default function NotFound() {
return (
<div>
<h2>Not Found</h2>
<p>Could not find requested resource</p>
<p>
View <Link href="/">all posts</Link>
</p>
</div>
)
}
The problem is, when I navigate to not existing route, 404 page renders correctly, but inifintely reloads.
tl;dr: I've wrote not-found.tsx component. Expected it to just display not found page, but it reloads infinitely.
"Is this in development mode? If so, that's expected behaviour for the 404 page. It shouldn't behave like that in production."
Thanks juliomalves. Yeah, it was in development mode.
p.s. Weird expected behavior imho, idk why they made it like that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With