give each app its own page, preloading and session stores, using context

This commit is contained in:
Rich Harris
2019-04-29 14:52:19 -04:00
parent 9c48e32a45
commit afeedf6bb2
17 changed files with 54 additions and 49 deletions

View File

@@ -7,12 +7,14 @@
</script>
<script>
import { preloading } from '@sapper/app';
import { stores } from '@sapper/app';
import { setContext } from 'svelte';
export let child;
export let rootPreloadFunctionRan;
const { preloading } = stores();
setContext('x', { rootPreloadFunctionRan });
</script>

View File

@@ -1,5 +1,6 @@
<script>
import { page } from '@sapper/app';
import { stores } from '@sapper/app';
const { page } = stores();
</script>
<h1>{$page.params.slug}</h1>