N
Nuxt8mo ago
FoxCode

OnMounted twice

Why does onMounted run twice for me? It only runs twice when I go from another page to another page, if I refresh the page from where I am it runs correctly - only once. I'm using nuxt-content and onMounted is in the component
No description
1 Reply
FoxCode
FoxCodeOP8mo ago
I fixed it with :key, like this: <NuxtPage :key="$route.fullPath"/>

Did you find this page helpful?