navigation_helpers.ts view source
(path: string | URL, options?: { replaceState?: boolean | undefined; noScroll?: boolean | undefined; keepFocus?: boolean | undefined; invalidateAll?: boolean | undefined; invalidate?: (string | ... 1 more ... | ((url: URL) => boolean))[] | undefined; state?: PageState | undefined; } | undefined): Promise<...> Navigate to a path only if we're not already on that path. This avoids unnecessary navigation history changes when already at the destination.
path
type
string | URLoptions?
type
{ replaceState?: boolean | undefined; noScroll?: boolean | undefined; keepFocus?: boolean | undefined; invalidateAll?: boolean | undefined; invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined; state?: PageState | undefined; } | undefinedoptional
returns
Promise<void>