SvelteKit will automatically await the `fetchPost` call before it starts rendering the page, since it’s at the top level. However, it won’t wait for the nested `fetchComments` call to complete – the page will render and `data.streamed.comments` will be a promise that will resolve as the request completes. We can show a loading state in the corresponding `+page.svelte` using Svelte’s [await block](https://svelte.dev/docs#template-syntax-await):
SvelteKit will automatically await the `fetchPost` call before it starts rendering the page, since it’s at the top level. However, it won’t wait for the nested `fetchComments` call to complete – the page will render and `data.streamed.comments` will be a promise that will resolve as the request completes. We can show a loading state in the corresponding `+page.svelte` using Svelte’s [await block](https://svelte.dev/docs#template-syntax-await):
```svelte
```svelte
<!-- file: +page.svelte --->
<scriptlang="ts">
<scriptlang="ts">
import type { PageData } from './$types';
import type { PageData } from './$types';
export let data: PageData;
export let data: PageData;
@ -132,6 +136,7 @@ Now, you can export a `snapshot` object from a `+page.svelte` or `+layout.svelte
For example, here is how you would capture and restore the value of a textarea:
For example, here is how you would capture and restore the value of a textarea: