Currently in having on:click | preventDefault="{() => showDetail({id})}"
and in showDetail
function i want to naviagte to particular id
which in i am passing on click of button.
I tried regular javascript methodlocation.assign
but this is reloading the page and destroying the purpose of SPA.
Is there any way to navigate in svelte without reloading
You need a router. There are SPA routers (Single Page Application) and SSR router (Server Side Rendering).
You may try :