Type Alias: ShallowNavigation
API / @xmachines/play-sveltekit-router / ShallowNavigation
type ShallowNavigation = "ignore" | "sync";Defined in: play-sveltekit-router/src/sveltekit-router-bridge.ts:38
What the bridge does with a shallow navigation of SvelteKit: goto(url, { shallow: true }),
pushState, replaceState, and a back or forward step between shallow entries.
"ignore"— the machine keeps its route. The bridge watchesafterNavigate."sync"— the machine follows the URL that the browser shows, the shallow URL too. The bridge watchespageof$app/state. Give each shallow URL a route in the machine: for a URL that the machine does not know, the bridge navigates back to the route of the machine, and that navigation loads the page. On SvelteKit 2, givepushStateandreplaceStatea new state object on each call: SvelteKit 2 changes onlypage.statefor a shallow navigation, so a call with the state object of the page changes nothing that the bridge can observe.