[Feature Request] Handling multiple <Outlet/> inside component #11512
amBunkowski
started this conversation in
Proposals
Replies: 1 comment
-
An // child-route.tsx
export function ChildRoute() {
return (
<>
<Slot id="someId">
// content for slot 1
</Slot>
<Slot id="someId2">
// content for slot 2
</Slot>
</>
)
} Or do you want to configure multiple child routes for the same path but with a You could potentially have different loaders as well. const router = createBrowserRouter([
{
path: "/",
element: <Root />,
loader: rootLoader,
children: [
// multiple children with the same path but different slots.
// You can have different elements and loaders
{
slotId: 'someId',
path: "team", // alternate syntax "team@someId"
element: <ElementForSomeId />,
loader: teamLoader,
},
{
slotId: 'someId2',
path: "team", // alternate syntax "team@someId2"
element: <ElementForSomeId2 />,
loader: teamLoader2,
},
],
},
]); |
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
-
It would be greate to see support for current setups:
<> <TableContainerStl> <Outlet id="someId"/> </LicencesTableContainerStl> <Outlet id="someId2" /> </>
Beta Was this translation helpful? Give feedback.
All reactions