Files
codegraph/docs/design
Colby Mchenry 1aebd3a30f fix(react-router): a route that renders <Outlet /> renders nothing of its own (#2670)
A route with no element renders an `<Outlet />`, and JSX routes already read
`element={<Outlet />}` that way. Route objects did not:

- `element: <Outlet />` and `Component: Outlet` made `Outlet` the route's
  page and the layout of every route inside it. Those `layout:Outlet`
  references link nothing: 93 failed rows on Medusa's admin dashboard, 106
  on Mercur's, 87 on mercurjs/vendor-panel.
- A `lazy` loader returning `{ Component: Outlet, loader }` (Medusa's `:id`
  routes import their page module only for its loader and breadcrumb) read
  as unreadable, so the route fell back to that module's page, which became
  the layout of the routes inside: a product's detail page drawn around its
  variants' pages.

Such a route object is now an `outlet` scope. It is a route at its own
address, so a navigation there still lands, and it sits inside the layouts
around it, but it has no page reference and is no layout. A page inside at
the same address claims the address as before, and a `path: ''` one only
groups its children at its parent's address. `lazyRouteReference` returns
`Outlet` for a loader that hands it back, and the JSX branch drops it the way
it drops `element={<Outlet />}`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:59:29 +00:00
..