Skip to content

How to use useRoute() in nuxt? #520

Answered by HendrikJan
HendrikJan asked this question in Q&A
Discussion options

You must be logged in to vote

I found that you now can use functions from unjs/h3 like so:

import { getQuery } from 'h3'

const lang = getQuery(event).lang; // <-- get the "lang" parameter from the query
console.log('language is set to:', lang)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HendrikJan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant