Skip to content

Commit

Permalink
Add layout outlet docs (#12548)
Browse files Browse the repository at this point in the history
* layout outlet docs

* sign contributors
  • Loading branch information
vladinator1000 authored Dec 14, 2024
1 parent 2cee65b commit 12beff7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,4 @@
- yuleicul
- zeromask1337
- zheng-chuang
- vladinator1000
18 changes: 18 additions & 0 deletions docs/start/framework/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,24 @@ export default [
] satisfies RouteConfig;
```

To see `projects/home.tsx` appear in the layout, we'll need an outlet:

```tsx filename=./projects/project-layout.tsx lines=[8]
import { Outlet } from "react-router"

export default function ProjectLayout() {
return (
<div>
<aside>Example sidebar</aside>
<main>
<Outlet />
</main>
</div>
)
}

```

## Index Routes

```ts
Expand Down

0 comments on commit 12beff7

Please sign in to comment.