Vue · Middle · Question 34 of 75

What does props: true in a route definition do?

{ path: "/users/:id", component: UserPage, props: true }

Explanation

The component declares defineProps<{ id: string }>() and becomes easier to reuse and test. A function form can map query params too.

Further reading

Problem with a question

Vue · Middle · question 34

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz