Blocking navigation with Nuxt 4 #384
Unanswered
lorenzo3117
asked this question in
Questions
Replies: 1 comment
-
You can |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hello,
I recently started learning Vue.js and Nuxt. I initially used useFetch to block the navigation and show the , which works well for this particular app (small amount of data that doesn't change).
But I quickly realized that the cached data gets purged when navigating to a different page and unmounting the component. I then switched to Pinia Colada with Pinia and both Nuxt plugins, which should support SSR. But I can't get the same blocking navigation functionality to work the same like with useFetch. Even with await, it behaves like a classic SPA by instantly navigating to the page.
Did any of you experience the same?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions