NextJS - not-found.jsx
Answered
Tamaskan Dog posted this in #help-forum
Tamaskan DogOP
I recently noticed while debugging an app that my not-found.jsx file was running every route (even if it was a valid route). I thought at first it may be something specific to my setup since I use a catch all dynamic route for the entire website, however, I think it has to do with NextJS itself.
I created a new project with
Why is that? Is the 404 page always ran in case something doens't resolve and NextJS can quickly swap that route in??
I created a new project with
create-next-app. I then added a not-found.jsx file along with console.log statements in the home page and the 404 page. If you go to the home page, you will notice both console.log statements run. Why is that? Is the 404 page always ran in case something doens't resolve and NextJS can quickly swap that route in??
5 Replies
There's already a issue for this
Tamaskan DogOP
@"use php" thank you 🙏 I will make as resolved and just follow the issue 🙂
You can try to comment on the issue, and maybe get updates