so I tried to do page transitions on css but the leave
transition didn't work, so I tried to do it with JS Hooks
, but leave animations still doesn't work. I tried commenting on every step and I discovered that leave
is not even getting called.
Script:
methods: {
beforeEnter: function (el) {
console.log("Before Enter")
// ...
},
enter: function (el, done) {
console.log("Entered")
// ...
},
leave: function (el, done) {
console.log("Leave")
// ...
}
}
Template:
<div id="app">
<nav-bar />
<transition
mode="out-in"
@before-enter="beforeEnter"
@enter="enter"
@leave="leave"
>
<nuxt />
</transition>
</div>
I have read the documentation for the transitions and I have even copied their code and pasted it as it is but still seems to be of no difference. I used yarn create nuxt-app
so you would assume I'm on the most stable update
nuxt: 2.15.8
node: 14.18.1
ubuntu: 18.04.6 LTS