We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin
v16.15.1
3.0.0-rc.11
0.5.4
npm@8.12.1
vite
-
N/A
In the docs (https://v3.nuxtjs.org/api/utils/navigate-to/#navigating-within-a-vue-component) when using navigateTo in a component, it is said to use return in front of it, but this will throw a compiler error:
navigateTo
return
ERROR [@vue/compiler-sfc] 'return' outside of function. (2:0) 13:19:21 /Users/reinierkaper/projects/remx/apps/nuxt-app/pages/vision.vue 1 | <script setup lang="ts"> | ^ 2 | return navigateTo('/', { redirectCode: 301 }) | ^ 3 | </script>
Should it be awaited instead?
If so, I can PR a docs change if you like.
No response
The text was updated successfully, but these errors were encountered:
Yes, we should definitely not return it in a <script setup> block. A PR would be gratefully accepted.
<script setup>
Sorry, something went wrong.
await navigateTo()
Successfully merging a pull request may close this issue.
Environment
Darwin
v16.15.1
3.0.0-rc.11
0.5.4
npm@8.12.1
vite
-
-
-
Reproduction
N/A
Describe the bug
In the docs (https://v3.nuxtjs.org/api/utils/navigate-to/#navigating-within-a-vue-component) when using
navigateTo
in a component, it is said to usereturn
in front of it, but this will throw a compiler error:Should it be awaited instead?
If so, I can PR a docs change if you like.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: