Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix element tree structure for layout route example #9025

Merged
merged 2 commits into from Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -67,3 +67,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 />
timdorr marked this conversation as resolved.
Show resolved Hide resolved
</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