vue-router
vue-router copied to clipboard
Specifying one single value for the props property with named views
What problem does this feature solve?
When passing from a component to multiple (named) ones, we also need to change the way the props
property is defined. If the user of the lib is not aware of that change, the props are not passed to his components anymore and his program stops to work normally.
This code break can be avoided if we interpret the single-component prop config as valid for multiple-components by extension.
What does the proposed API look like?
components: {
default: MyComponent,
sideBar: MySideBar
},
props: {
default: true,
sideBar: true
},
could be written as:
components: {
default: MyComponent,
sideBar: MySideBar
},
props: true,
The same for the function-based version of props
.