Skip to content

Types: AddBeforeRouteHook()

ts
type AddBeforeRouteHook: (hook) => RouteHookRemove;

Adds a hook that is called before a route change. Returns a function to remove the hook.

Parameters

ParameterTypeDescription
hookBeforeRouteHookBeforeRouteHook The hook function to add.

Returns

RouteHookRemove

A function that removes the added hook.