Skip to content
Discussion options

You must be logged in to vote

Create a +layout.server.ts file at the root of your application and return the data through the load function. This makes the data available to every page.

https://kit.svelte.dev/docs/load#layout-data

Then, use the page store to access that data directly in your search component without having to pass it in as a prop.

https://kit.svelte.dev/docs/load#$page-data

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by m1212e
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