Reputation: 321
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?
Upvotes: 7
Views: 2409
Reputation: 321
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.
Upvotes: 15