Skip to content

Commit

Permalink
[docs] match word spelling with existing and main docs (#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Jul 2, 2021
1 parent 8828743 commit 559aad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/05-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Stores are _contextual_ — they are added to the [context](https://svelte.dev/t

Because of that, the stores are not free-floating objects: they must be accessed during component initialisation, like anything else that would be accessed with `getContext`.

- `getStores` is a convenience function around `getContext` that returns `{ navigating, page, session }`. This needs to be called at the top-level or synchronously during component or page initialization.
- `getStores` is a convenience function around `getContext` that returns `{ navigating, page, session }`. This needs to be called at the top-level or synchronously during component or page initialisation.

The stores themselves attach to the correct context at the point of subscription, which means you can import and use them directly in components without boilerplate. However, it still needs to be called synchronously on component or page initialization when `$`-prefix isn't used. Use `getStores` to safely `.subscribe` asynchronously instead.
The stores themselves attach to the correct context at the point of subscription, which means you can import and use them directly in components without boilerplate. However, it still needs to be called synchronously on component or page initialisation when `$`-prefix isn't used. Use `getStores` to safely `.subscribe` asynchronously instead.

- `navigating` is a [readable store](https://svelte.dev/tutorial/readable-stores). When navigating starts, its value is `{ from, to }`, where `from` and `to` both mirror the `page` store value. When navigating finishes, its value reverts to `null`.
- `page` is a readable store whose value reflects the object passed to `load` functions — it contains `host`, `path`, `params` and `query`. See the [`page` section](#loading-input-page) above for more details.
Expand Down

0 comments on commit 559aad5

Please sign in to comment.