Answer the question
In order to leave comments, you need to log in
IMG tag as a vue component. Is this generally correct?
Hello. I started to study vue js, made a slider for an example, everything is ok. I started to deal with the components, I decided to remake the slider on the components, and then a question arose. There is an IMG tag there, I make it a component, but it goes in my DOM as a double tag. I'm wondering if it's correct to specify the img tag as a component?
Answer the question
In order to leave comments, you need to log in
No, since the component implies content that cannot physically be in img.
Plus, Vue treats component tags as custom tags, i.e. ones that are not in the spec. That's why it adds a closing tag.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question