Skip to content

Commit 12beff7

Browse files
Add layout outlet docs (#12548)
* layout outlet docs * sign contributors
1 parent 2cee65b commit 12beff7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,4 @@
319319
- yuleicul
320320
- zeromask1337
321321
- zheng-chuang
322+
- vladinator1000

docs/start/framework/routing.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,24 @@ export default [
153153
] satisfies RouteConfig;
154154
```
155155

156+
To see `projects/home.tsx` appear in the layout, we'll need an outlet:
157+
158+
```tsx filename=./projects/project-layout.tsx lines=[8]
159+
import { Outlet } from "react-router"
160+
161+
export default function ProjectLayout() {
162+
return (
163+
<div>
164+
<aside>Example sidebar</aside>
165+
<main>
166+
<Outlet />
167+
</main>
168+
</div>
169+
)
170+
}
171+
172+
```
173+
156174
## Index Routes
157175

158176
```ts

0 commit comments

Comments
 (0)