The default.js examples
suggest that it is possible to contain default.js
files deeper than the parallel
route itself. Such that subfolders can contain a version of default Next displays when
a fallback is needed. This does not work as proposed in 14.2.0 & 14.2.2 when using a
route parameter.
The route file-tree looks like this:
- @team
-- [teamId]
default.tsx
page.tsx
- [teamId]
page.tsx
-- settings
page.tsx
Both are simultaneously rendered beneath each other in the root layout.tsx
.
-
We expect following when navigating to
/testId/
: (passed)- the content of
@team/[teamId]/page.tsx
is rendered - the content of
[teamId]/page.tsx
is rendered
- the content of
-
We expect following when navigating to
/testId/settings
: (failed)- the content of
[teamId]/settings/page.tsx
is rendered - the content of
@team/[teamId]/default.tsx
is rendered (Unexpected)
- the content of
By default, neither is rendered from point two, since a 404 is thrown. Only, when
adding a default.js
at @team/
directly, the first is rendered. The more deeply
located default file is completely ignored.
This is unexpected, according to the docs.