-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In the current form, it seems to me the codemod will skip over a lot of components, as many will have at least one event handler like click()
.
I believe it should be possible to transform these:
import Component from '@ember/component';
export default class FooComponent extends Component {
tagName = 'button';
click() {
// do something
}
}
{{@text}}
will be migrated to:
import Component from '@ember/component';
import { action } from '@ember/object';
export default class FooComponent extends Component {
tagName = '';
@action
handleClick() {
// do something
}
}
<button {{on "click" this.handleClick}}>
{{@text}}
</button>
Or do I miss something that would make that more complicated?
Btw, this is assuming we have #3, don't know how useful this is for classic classes. 🤔
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request