`<component>` dynamic set to button error
Vue version
3.3
Link to minimal reproduction
Steps to reproduce
if subcomponents props are defined like this => demo
const props = defineProps({
tag:{
type: String,
default: 'button'
}
})
in parent component
// tag = "a" or tag="input" is OK
// tag = "button" is OK
<Comp tag="button">test</Comp>
if subcomponents props are defined like this => demo
const props = withDefaults(defineProps<{ tag: string }>(), {
tag: 'button',
})
in parent component
// tag = "a" or tag="input" is OK
// tag = "button" Maximum call stack size exceeded
<Comp tag="button">test</Comp>
What is expected?
component render correctly button, How do I get the components to work correctly?
What is actually happening?
Sorry, I don't know.
System Info
No response
Any additional comments?
No response