Reputation: 841
I am controlling a Tabview with a boolean variable isTabsEnabled
to toggle displaying of tabs. This prop is passed as child to the screens using it, this is the parent file,
export{
props:{
isTabsEnabled: true
}
}
ESLint throws the error vue/require-prop-type-constructor
, I tried using propsData
, this removes the warning message, but the functionality breaks.
Any suggestion on how can I avoid this warning?
Upvotes: 8
Views: 12876
Reputation: 34286
You need to specify the prop type:
props: {
isTabsEnabled: {
type: Boolean,
default: true
}
}
Upvotes: 23