I've been using this addon for 2 years not just for migrating old ember apps to octane way, but for some cases that we need modifiers we can use this addon as a useful library to provide a this.element into glimmer component when I have to wait for the element inserted into the DOM. In some cases, we don't want to create a global modifier (because modifiers are global as helpers on the Ember ecosystem) to get some HTML element into the component.
I know this package was created with the purpose to solve some gaps and speed the migration of classic components to glimmer components, but over time it showed very ergonomic when your component require some DOM manipulation.
In this example below, I have to prevent that click on <li/> children created by submenu start to propagate click on <li/>. could I create a modifier? clear! But this addon made it more explicit that I'm waiting for a "did-insert" event and there I have a more readable and flexible code that allows us to manipulate the dom several times without needing to do a premature abstraction creating several modifiers. That's why shouldn't consider anymore it's generally an anti-pattern and put fear in those who read the readme
I've been using this addon for 2 years not just for migrating old ember apps to octane way, but for some cases that we need modifiers we can use this addon as a useful library to provide a
this.element
into glimmer component when I have to wait for the element inserted into the DOM. In some cases, we don't want to create a global modifier (because modifiers are global as helpers on the Ember ecosystem) to get some HTML element into the component.I know this package was created with the purpose to solve some gaps and speed the migration of classic components to glimmer components, but over time it showed very ergonomic when your component require some DOM manipulation.
In this example below, I have to prevent that click on
<li/>
children created bysubmenu
start to propagateclick
on<li/>
. could I create a modifier? clear! But this addon made it more explicit that I'm waiting for a "did-insert" event and there I have a more readable and flexible code that allows us to manipulate the dom several times without needing to do a premature abstraction creating several modifiers. That's why shouldn't consider anymore it's generally an anti-pattern and put fear in those who read the readme