Vue-router official website on the routing components of the three modes of parameter transfer: Boolean mode object mode function mode, do not understand, do not understand what do you mean?

1. Routing component pass parameters
using $route in a component makes it highly coupled to its corresponding route, thus limiting its flexibility by making the component available only on certain URL.

use props to decouple components from routing:
2. Replace the coupling with $route

const User = {
template:"

User {{$route.params.id}} < / div >"
}
const router = new VueRouter ({
routes: [

)
{ path: "/user/:id", component: User }

]
})
3. Decoupling through props

const User = {
props: ["id"],
template:"

User {{id}} < / div >"
}
const router = new VueRouter ({
routes: [

)
{ path: "/user/:id", component: User, props: true },

//  `props` :
{
  path: "/user/:id",
  components: { default: User, sidebar: Sidebar },
  props: { default: true, sidebar: false }
}

]
})
so you can use the component anywhere, making it easier to reuse and test.
4. Can you write a few examples to illustrate?

Apr.19,2022
Menu