load: PageServerLoad (event and params) #7538
-
|
I have load functions with event and it's workin and with params and it's working. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Can you give an example on what you are trying to do? |
Beta Was this translation helpful? Give feedback.
-
|
export const load = (event) => {
// use can use event
const { params } = event;
// you can use params or event.params
}More info on what's in |
Beta Was this translation helpful? Give feedback.
paramsis a part of theeventobject, e.g.,event.paramsYou could also extract params from event.
More info on what's in
eventin the type docs https://kit.svelte.dev/docs/types#sveltejs-kit-requestevent