diff --git a/site/content/docs/04-preloading.md b/site/content/docs/04-preloading.md index 204b360..bdbd70a 100644 --- a/site/content/docs/04-preloading.md +++ b/site/content/docs/04-preloading.md @@ -23,7 +23,7 @@ It lives in a `context="module"` script — see the [tutorial](https://svelte.de The `preload` function receives two arguments — `page` and `session`. -`page` is a `{ path, params, query }` object where `path` is the URL's pathname, `params` is derived from `path` and the route filename, and `query` is an object of values in the query string. +`page` is a `{ host, path, params, query }` object where `host` is the URL's host, `path` is its pathname, `params` is derived from `path` and the route filename, and `query` is an object of values in the query string. So if the example above was `src/routes/blog/[slug].svelte` and the URL was `/blog/some-post?foo=bar&baz`, the following would be true: diff --git a/site/content/docs/07-state-management.md b/site/content/docs/07-state-management.md index 8ec9b51..dd1cb7f 100644 --- a/site/content/docs/07-state-management.md +++ b/site/content/docs/07-state-management.md @@ -14,7 +14,7 @@ Inside a component, get references to the stores like so: ``` * `preloading` contains a readonly boolean value, indicating whether or not a navigation is pending -* `page` contains a readonly `{ path, params, query }` object, identical to that passed to `preload` functions +* `page` contains a readonly `{ host, path, params, query }` object, identical to that passed to `preload` functions * `session` contains whatever data was seeded on the server. It is a [writable store](https://svelte.dev/tutorial/writable-stores), meaning you can update it with new data (for example, after the user logs in) and your app will be refreshed