Svelte · Middle · Question 35 of 75
How does a page load get data from its layout's load?
export async function load({ parent }) {
const { user } = await parent();
return { posts: await getPosts(user.id) };
}- ✓Correct answer: With
await parent() - 2By importing the layout file
- 3It can't; data flows only to components
Explanation
Call parent() after starting independent work, otherwise you create a waterfall.