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

@@ -1,10 +1,7 @@
import { getContext } from 'svelte';
import { CONTEXT_KEY, stores } from '@sapper/internal/shared';
import { CONTEXT_KEY } from '@sapper/internal/shared';
export const preloading = { subscribe: stores.preloading.subscribe };
export const page = { subscribe: stores.page.subscribe };
export const getSession = () => getContext(CONTEXT_KEY);
export const stores = () => getContext(CONTEXT_KEY);
export { default as start } from './start/index';
export { default as goto } from './goto/index';