What are the drawbacks if component does not have a wrapper? If tagName === ""


#1

Hi everyone, does anyone know are there any drawbacks if component does not have a wrapper?

If tagName === "".

The code for component would be:

import Ember from "ember";

export default Ember.Component.extend({
    tagName: ""
});

#2

You will lose this cool stuff. className bindings, attribute bindings, ember event handling and this.$()


#3

@kumkanillam, thank you for reply. You are right. In this case this.$(), this.element and this.elementId are null, I’ve checked that.


#4

Is there anything else? I have a strong reason to use tagName === ""

Not having className bindings, attribute bindings and this.$() is ok for me


#5

Keep it in mind that you can’t define click,doubleclick… events in tagless component. General advice is don’t use tagless component. No problem, if you have a strong reason.