onPageTransitionStart()
hook
The onPageTransitionStart()
hook, together with onPageTransitionEnd()
, enables you to implement page transition animations.
TypeScript
Don't omit
ReturnType<OnPageTransitionStartAsync>
otherwise TypeScript won't strictly check the return type.
See API >
pageContext
> Typescript for more information on how to extendpageContext
with your own extra properties.
Without vike-{react,vue,solid}
If you don't use a UI framework Vike extension vike-react
/vike-vue
/vike-solid
, then make sure to use Client Routing: the onPageTransitionStart()
hook requires it (it's executed upon client-side navigation).