You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rule, no-action-modifier affects both modifier and helper.
However, the error message, Do not use 'action' as <div {{action ...}} />. Instead, use the 'on' modifier and 'fn' helper is only suitable for modifier usage.
In place of {{action}} helper (say, in closure action), the error message should advise using the @action decorator.
The text was updated successfully, but these errors were encountered:
I think @action decorator mention may confuse user, because of different context (template), but I like idea about error message improvment, could we figure out proper message?
<MyComponent @handler={{actionthis.test}} />
Do not use action helper for this.test context binding. Instead, use @action decorator for method this.test in component class.
Do not use action helper for this.test context binding. Instead, use @action decorator for method this.test in component class. And fn helper to bind method arguments, like: @handler={{fn this.test this.someProp}}
@gokatz - The no-action-modifierrule should only be warning about modifier usage, the no-action rule should flag both helper and modifier and the resulting message should tell you the right thing to use in each scenario.
The rule,
no-action-modifier
affects both modifier and helper.However, the error message, Do not use 'action' as <div {{action ...}} />. Instead, use the 'on' modifier and 'fn' helper is only suitable for modifier usage.
In place of
{{action}}
helper (say, in closure action), the error message should advise using the@action
decorator.The text was updated successfully, but these errors were encountered: