Skip to content

with vue3.4 + router4 or above useRoute() or useRouter() will return undefined #2124

Closed Answered by posva
jesseice asked this question in Help and Questions
Discussion options

You must be logged in to vote

useRoute() must be used within script setup. It's only undefined when called in the wrong places. BTW, use discussions or the discord chat to ask questions, thanks!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2123 on January 30, 2024 08:32.