Answer the question
In order to leave comments, you need to log in
Declaring props in a component as an object. What if there are no requirements?
I have two props in a component - required (boolean) and data (mixed).
For required there is a check for the type and default value, for data there is none of this.
Is the way I write below the only possible way to declare props or is there a more concise way (to get rid of {})?
props: {
data: {},
required: {
type: Boolean,
default: false,
}
}
Answer the question
In order to leave comments, you need to log in
Don't skimp on the documentation . All the answers to your question are there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question