interface NavigateOptions {
    flushSync?: boolean;
    preventScrollReset?: boolean;
    relative?: RelativeRoutingType;
    replace?: boolean;
    state?: any;
    viewTransition?: boolean;
}

Properties

flushSync?: boolean

Wraps the initial state update for this navigation in a ReactDOM.flushSync call instead of the default React.startTransition

preventScrollReset?: boolean

If you are using , prevent the scroll position from being reset to the top of the window when navigating

Defines the relative path behavior for the link. "route" will use the route hierarchy so ".." will remove all URL segments of the current route pattern while "path" will use the URL path so ".." will remove one URL segment.

replace?: boolean

Replace the current entry in the history stack instead of pushing a new one

state?: any

Adds persistent client side routing state to the next location

viewTransition?: boolean

Enables a View Transition for this navigation by wrapping the final state update in document.startViewTransition(). If you need to apply specific styles for this view transition, you will also need to leverage the useViewTransitionState() hook.