Vue 3 · Router and Pinia

Read the current route

Access route params and query values.

const route = useRoute();
console.log(route.params.id);

Official Vue 3 documentation

More router and pinia commands

All router and pinia commands · Vue 3 cheatsheet

Was this page helpful?