Skip to content

Commit a53f9a7

Browse files
docs: Fix element tree structure for layout route example (#9025)
* docs: Fix element tree structure * Update docs/getting-started/concepts.md Co-authored-by: Tim Dorr <[email protected]>
1 parent 3610756 commit a53f9a7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@
7070
- vijaypushkin
7171
- vikingviolinist
7272
- xcsnowcity
73+
- gowthamvbhat

docs/getting-started/concepts.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -657,11 +657,9 @@ Here's a part of our route config we haven't matched yet: `/privacy`. Let's look
657657
And the resulting element tree rendered will be:
658658

659659
```jsx
660-
<App>
661-
<PageLayout>
662-
<Privacy />
663-
</PageLayout>
664-
</App>
660+
<PageLayout>
661+
<Privacy />
662+
</PageLayout>
665663
```
666664

667665
The `PageLayout` route is admittedly weird. We call it a [layout route](#layout-route) because it doesn't participate in the matching at all (though its children do). It only exists to make wrapping multiple child routes in the same layout simpler. If we didn't allow this then you'd have to handle layouts in two different ways: sometimes your routes do it for you, sometimes you do it manually with lots of layout component repetition throughout your app:

0 commit comments

Comments
 (0)