root layout issue with not-found.tsx
Unanswered
Havana posted this in #help-forum
HavanaOP
the not-found.tsx is not able to pick up my root layout. I tried putting it in a [...not-found]/page.tsx with my not-found.tsx in the app/ dir yet it didn't work. I tried following some articles on stack overflow and nextjs but nothing works out. Any one who can guide me around it? I really need to have it my app cuz I have put a fun easter egg in it.
2 Replies
You can’t wrap your root-layout in
not-found.tsx
since this will wrap pages. global-error.tsx
can wrap your root layout tho, check if that does the job. And look in the docs to implement it, it’s trickier than just error.tsx