Skip to content

API DocumentationDocs


API Documentation / RouterScrollBehavior

Interface: RouterScrollBehavior()

Type of the scrollBehavior option that can be passed to createRouter.

RouterScrollBehavior(to, from, savedPosition): Awaitable<false | void | ScrollPosition>

Type of the scrollBehavior option that can be passed to createRouter.

Parameters

to: RouteLocationNormalizedGeneric

Route location where we are navigating to

from: RouteLocationNormalizedLoadedGeneric

Route location where we are navigating from

savedPosition: null | _ScrollPositionNormalized

saved position if it exists, null otherwise

Returns

Awaitable<false | void | ScrollPosition>

Released under the MIT License.