Skip to content

Commit

Permalink
docs: change grammar to help reduce confusion (#431)
Browse files Browse the repository at this point in the history
It was not clear which page below the layout inherits the data, because in fact it could be any page.

The confusion can arise from the way the previous sentence was expressed, as **visually**, there is nothing `below` the layout in the project tree.

There are siblings though, like `+page.svelte` but for a Svelte beginner it is **not** immediately obvious that this page also falls `under` the same layout.
  • Loading branch information
brokenthorn authored Dec 14, 2023
1 parent 8cc995f commit ee29e32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ Now, add a sidebar in the layout for the post page:
</style>
```

The layout (and the page below it) inherits `data.summaries` from the parent `+layout.server.js`.
The layout (and any page below it) inherits `data.summaries` from the parent `+layout.server.js`.

When we navigate from one post to another, we only need to load the data for the post itself — the layout data is still valid. See the documentation on [invalidation](https://kit.svelte.dev/docs/load#rerunning-load-functions) to learn more.

1 comment on commit ee29e32

@vercel
Copy link

@vercel vercel bot commented on ee29e32 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.