[Feature] The ability to define layout at element level (not above) #10896
eslachance
started this conversation in
Proposals
Replies: 1 comment
-
Edit: there is a workaround for the home route: export const routes = [
{
element: <MainLayout />,
children: [ { index: true, element : <Home /> } ]
},
element: <SecondaryLayout />,
children: [ { path: '/about', element : <About /> } ]
}
] Still somewhat dirty, but a bit better. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Currently we are building a system were we are using 3 different layouts. Each page in what I'll just call a wizard, can have a different layout, and render the content using its own Outlet.
Because each page can be different, I'm finding myself having to create a pattern like this to provide the layout:
What would be great is to rather do this:
I do have a dirty workaround for most pages, but, for the
/
route, I didn't really have a proper solution so I actually had to redirect to a separate route since an index route can't have children:So, having a layout property would be greatly helpful in this case!
Beta Was this translation helpful? Give feedback.
All reactions