Allow non-root not-found
to be passed down from its own segment until the next not-found
#55016
devjiwonchoi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Option 1
Allow non-root
not-found
to be passed down from its own segment until the nextnot-found
.Option 2 ❌
Explicitly support i18n not-found, with declared parent dir name
[lang]
.If the project has
[lang]
,app/[lang]/not-found
will be treated as global.Should consider route groups also.
Option 3 ❌
Let global
not-found
to receive thecontext.params.slug (lang)
in order to set the translation bylang
.I'm assuming this won't work since it's on the root.
Non-Goals
It should not interfere with any other routing.
Background
Say in i18n, the project needs an i18n supported
not-found
, which probably needs to be within theapp/[lang]
segment.Since the non-root
not-found
is confined to predefined routes, the invalid URL is going to show a default 404 page if no rootnot-found
is set.The current possible DX is to set a
not-found
file on every segment or set a globalnot-found
without i18n support.In multiple root group routes without root layout on
app
, they won't have any root not-founds.Proposal
I am willing to contribute.
Beta Was this translation helpful? Give feedback.
All reactions