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.
params
is a part of theevent
object, e.g.,event.params
You could also extract params from event.
More info on what's in
event
in the type docs https://kit.svelte.dev/docs/types#sveltejs-kit-requestevent