Possible Bug? Splat routes inside layout routes only match when there are at least two splats along the path #13201
Unanswered
tommie-lie
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am not sure if this should be a bug, but I'm definitely puzzled by the behavior.
I have a route layout like this:
Expected behavior:
foo
, I expect<FooScreen />
to be renderedfoo/details
I expect<FooScreen />
(which has an<Outlet />
and<FooDetails />
to be renderedActual behavior:
foo/details
works as expectedfoo
, only the element from the foo route is rendered, not the<FooScreen />
from the splat route.When I add a splat to the layout route, everything works and I could accept that, but in the actual application, I have several layout routes and only one of them needs the splat: more complex example on stackblitz
In the stackblitz example, the working path has three layout routes but only the second one has the splat.
Is this a bug (I could live with both variants working or not working) or can someone explain the logic behind this behavior?
Beta Was this translation helpful? Give feedback.
All reactions