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
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9b986-68fdd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9b986-68fdd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?