Skip to content

Proper way to check navigating in svelte 5 #16062

Answered by brunnerh
gterras asked this question in Q&A
Discussion options

You must be logged in to vote

I would check the type property. from and to can potentially be null when a navigation is happening, type cannot (at least according to the type definitions).

The rune based state objects are an additive feature of SvelteKit, so they are separate from the Svelte 4 to 5 migration, though they do require runes. Not sure whether this should be tacked onto the existing guide or whether a separate document in the SvelteKit docs would be a good idea. For most of these store migrations the path should be straightforward.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gterras
Comment options

Answer selected by gterras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants