Skip to content

Commit

Permalink
docs: Fix element tree structure for layout route example (#9025)
Browse files Browse the repository at this point in the history
* docs: Fix element tree structure

* Update docs/getting-started/concepts.md

Co-authored-by: Tim Dorr <timdorr@users.noreply.github.com>
  • Loading branch information
gowthamvbhat and timdorr committed Jun 30, 2022
1 parent 3610756 commit a53f9a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -70,3 +70,4 @@
- vijaypushkin
- vikingviolinist
- xcsnowcity
- gowthamvbhat
8 changes: 3 additions & 5 deletions docs/getting-started/concepts.md
Expand Up @@ -657,11 +657,9 @@ Here's a part of our route config we haven't matched yet: `/privacy`. Let's look
And the resulting element tree rendered will be:

```jsx
<App>
<PageLayout>
<Privacy />
</PageLayout>
</App>
<PageLayout>
<Privacy />
</PageLayout>
```

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:
Expand Down

0 comments on commit a53f9a7

Please sign in to comment.