Uh oh!
There was an error while loading. Please reload this page.
fix(nuxt3)!: sync route object to currently resolved page - #4092
Conversation
✅ Deploy Preview for nuxt3-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
atinux
commented
Apr 5, 2022
Nice work @danielroe It would be nice to test indeed and check if it works when using a nested page too 😊 |
pi0
left a comment
There was a problem hiding this comment.
Looks good to me. Please ping when did additional tests otherwise we can try with edge to test behavior.
danielroe
commented
Apr 5, 2022
Tested ✅ Note: At the moment, a nested page's async setup doesn't block the loading of the parent, which means it doesn't block the updating of the |
@danielroe I fighting with following case:
<template>
<div>
<NuxtLayout>
<NuxtPage/>
</NuxtLayout>
</div>
</template>
<template>
<div>
<NuxtLink to="/hi.html">
Go to Hi page
</NuxtLink>
</div>
</template>
<template>
<div>
<h1>Hi</h1>
</div>
</template>
<script lang="ts" setup>const route =useRoute()console.log(route.params)</script>
{}How can i get |
misaon
commented
Apr 6, 2022
Im going back to |
🔗 Linked issue
resolvesnuxt/nuxt#13645, resolves https://github.com/nuxt/framework/discussions/2459
❓ Type of change
📚 Description
This PR does two things:
useRoute()did not return the correct route until the plugin lifecycle had fully run)I would especially welcome testing on this given the nature of the change.
📝 Checklist