PageTransition JavaScript Hooks problem
See original GitHub issueGreetings. I ran into a problem when calling javascript transition hooks.
I have reproduced the issue here:
https://stackblitz.com/edit/nuxt-starter-6qvzci?file=pages/second.vue
Can you please tell me if I can assign global transitions for all pages, as it is implemented, for example, in vue router.
<router-view v-slot="{ Component }"> <transition name="fade" mode="out-in"> <component :is="Component" /> </transition> </router-view>
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
JS content not working after a page transition using Barba.JS
To get page-specific animations to work from one page to another after a transition, all of those animations have to be reinitialised. You...
Read more >Advanced Page Transitions in Next.js with Router Events and ...
Next.js allows you to listen to various events in its Router object, these events occur during the lifecycle of a page to page...
Read more >React Router V6 and Framer Motion Tutorial - YouTube
PAGE TRANSITION ANIMATIONS IN REACT! In this video I will be showing how to use the framer motion library to create page transitions...
Read more >Barba.js with GSAP - 09. Once, Leave, Enter Hooks - YouTube
Today we cover once, leave and enter hooks. ... 4.3K views 2 years ago Barba. js 101 - Page Transition Tutorials. 4,311 views...
Read more >Page Transistions in React.js using Framer Motion - Section.io
The useLocation hook will assist the routes in determining the page we are on. We also import the page wrapped with animatedPresence from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for your answers, thanks to them I have implemented everything I wanted.
@jiblett1000 Thanks to your tip on these hooks, I implemented a java script logic for transitions:
// app.vue
const nuxtApp = useNuxtApp()
nuxtApp.hook('page:start', () => {
....
})
nuxtApp.hook('page:finish', () => {
....
})
@derz Your answer helped implement transition properties globally for all pages
You could use a middleware to do that, for example: