#Router object (pathname, query) to string
9 messages · Page 1 of 1 (latest)
Are you using client side or server side?
This is for server side
I was going to recommend useRouter but that's for client side so the best way is to use getStaticPaths
How do you do this via useRouter?
const route = useRouter()
It will give you an object with all of the values from the URL. I'm sure slug would be there...
I don't think you understood my question. Basically I'm looking for some logic for the asPathString function that I put above
I dont think there is an util function for that, you would need to do it yourself
What do you want to do with this function?