ViewTransition and next() being deprecated #2718
Replies: 1 comment 1 reply
router.beforeResolve(async (to, from) => {
if (from.name && to.name !== from.name) {
await new Promise<void>((resolve) => {
document.startViewTransition(resolve)
})
}
}) |
1 reply
Answer selected by
yves-riot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, since
nextis deprecated, how should we migrate the following code?It wraps route changes with
document.startViewTransitionto have a native animation when the route change.Thank you
All reactions