Skip to content

Commit

Permalink
docs fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
zommerberg committed Dec 8, 2021
1 parent 73f8d2b commit 32f305e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/docs/05-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { goto, invalidate, prefetch, prefetchRoutes, onBeforeNavigate } from '$a
- `invalidate(href)` causes any `load` functions belonging to the currently active page to re-run if they `fetch` the resource in question. It returns a `Promise` that resolves when the page is subsequently updated.
- `prefetch(href)` programmatically prefetches the given page, which means a) ensuring that the code for the page is loaded, and b) calling the page's `load` function with the appropriate options. This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `<a>` element with [sveltekit:prefetch](#anchor-options-sveltekit-prefetch). If the next navigation is to `href`, the values returned from `load` will be used, making navigation instantaneous. Returns a `Promise` that resolves when the prefetch is complete.
- `prefetchRoutes(routes)` — programmatically prefetches the code for routes that haven't yet been fetched. Typically, you might call this to speed up subsequent navigation. If no argument is given, all routes will be fetched; otherwise, you can specify routes by any matching pathname such as `/about` (to match `src/routes/about.svelte`) or `/blog/*` (to match `src/routes/blog/[slug].svelte`). Unlike `prefetch`, this won't call `load` for individual pages. Returns a `Promise` that resolves when the routes have been prefetched.
- `onBeforeNavigate((navigationIntent)=>void)` — a navigation interceptor that triggers before we navigate to a new route. This is helpful if we want to conditionally prevent a navigation or lookup the upcoming url.Currently the onBeforeNavigate listener has to wrapped inside of a if(browser) check
- `onBeforeNavigate((navigationIntent)=>void)` — a navigation interceptor that triggers before we navigate to a new route. This is helpful if we want to conditionally prevent a navigation or lookup the upcoming url.Currently the onBeforeNavigate listener has to wrapped inside of a if(browser) check.

### $app/paths

Expand Down

0 comments on commit 32f305e

Please sign in to comment.