Skip to content
Discussion options

You must be logged in to vote

Hi Christian,

It is indeed possible to use both +layout.server and +layout. The data returned from the first gets passed to the second.
https://kit.svelte.dev/docs/load#input-properties-data

- export const load: LayoutLoad = async ({ parent }: LayoutLoadEvent) => {
- const { locale } = await parent();
+ export const load: LayoutLoad = async ({ data }: LayoutLoadEvent) => {
+ const { locale } = data;

  await loadLocaleAsync(locale);

  return {};
};

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dummdidumm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants