I want this
export default {
props: {
key: {
type: String,
required: true,
},
},
...
}
But it leads to a runtime error:
[Vue warn]: "key" is a reserved attribute and cannot be used as component prop.
EDIT:
To clarify: I want the reserved attribute "key" to be required. This is because my component relies on the trick of "Forcing component recreation by key change". (link)