We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin
v18.12.1
3.0.0-rc.14
1.0.0
npm@8.19.2
vite
modules
postcss
image
css
@nuxt/image-edge@1.0.0-27809804.194d2d6
-
Just use the javascript hooks of transitions, but here is my use case.
<template> <div> <NuxtLayout> <NuxtPage :transition="transition" /> </NuxtLayout> </div> </template> <script setup> import { gsap } from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; const layoutFooterEl = ref(null); const transition = { mode: 'out-in', css: false, onLeave: (el, done) => { console.log('leave'); gsap.to([el, layoutFooterEl.value], { opacity: 0, ease: 'none', duration: 0.3, onComplete: () => { console.log('leave complete'); done(); }, }); }, onAfterLeave: () => { console.log('after leave'); }, onBeforeEnter: (el) => { console.log('before enter'); gsap.set([el, layoutFooterEl.value], { opacity: 0, lazy: false }); }, onEnter: (el, done) => { console.log('enter'); gsap.set([el, layoutFooterEl.value], { opacity: 0 }); viewport.onResize(); ScrollTrigger.refresh(); lenis.value.scrollTo(0, { immediate: true }); gsap.to([el, layoutFooterEl.value], { lazy: false, opacity: 1, ease: 'none', duration: 0.7, onComplete: done, }); }, }; </script>
On page transitions, the onMounted() hook is called before the page enter. Here is the lifecycle I have on the page transition:
onMounted()
app.vue:29 leave page-2.vue:51 mounted app.vue:34 leave complete app.vue:44 before enter app.vue:41 after leave app.vue:48 enter
UPDATE: Also, the onUnmounted hook is called before the page finished the transition
onUnmounted
No response
The text was updated successfully, but these errors were encountered:
(Similar to #13471)
Sorry, something went wrong.
More relevant info here. This is an up stream bug in Vue. There is a PR claiming to fix this issue but it hasn't been merged for over a year :(
vuejs/core#5952 (comment)
Let's track this upstream issue in #13471.
No branches or pull requests
Environment
Darwin
v18.12.1
3.0.0-rc.14
1.0.0
npm@8.19.2
vite
modules
,postcss
,image
,css
,vite
@nuxt/image-edge@1.0.0-27809804.194d2d6
-
Reproduction
Just use the javascript hooks of transitions, but here is my use case.
Describe the bug
On page transitions, the
onMounted()
hook is called before the page enter. Here is the lifecycle I have on the page transition:UPDATE: Also, the
onUnmounted
hook is called before the page finished the transitionAdditional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: