Sveltekit page store
How to use the sveltekit page store to access url parameters
import { page } from '$app/stores'
$: name = $page.url.searchParams.get("name")
// name = Thomas
import { page } from "$app/stores";
$: slug = $page.params.id;
// url: /snippets/[id] => slug = value of id
import {page} from '$app/stores';
$: path = $page.url.pathname
// path = /test