Using a pathless route my custom not-found page does not get applied
Unanswered
Komondor posted this in #help-forum
Original message was deleted.
7 Replies
Original message was deleted
what was the route that you're tryin to access?
@aardani what was the route that you're tryin to access?
Komondor
Testing against a route that doesn’t exist so /something for example. I expected my custom not found page to display, instead I get the default black screen 404.
Original message was deleted
It must be app/not-found.tsx. Nothing in between app and the file
If you can’t use that, you can use app/…/[…catchAll]/page.tsx
Komondor
I see, thanks. Yeah if I move it to the root, it also wants a root layout which breaks the architecture I’m going for. I’ll play around with it, thank you!
You can also use this approach https://discord.com/channels/752553802359505017/766433464055496744/1125774882387525672 but I would just make a catch-all route