Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access parameter without load function in svelte kit

In SvelteKit, I want to access page.params without using the SSR load function because I want to have client side rendering only. Is there any way to access page.params without the SSR load function?

like image 487
Jatin Hemnani Avatar asked Jul 17 '26 07:07

Jatin Hemnani


1 Answers

I got the solution.

import { page } from "$app/stores";
const { slug } = $page.params;

and in this way I got the params without the load function.

like image 150
Jatin Hemnani Avatar answered Jul 23 '26 08:07

Jatin Hemnani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!