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
Multiple times we've run into issues when some boolean attribute is added to a view, then we forget to pass it, the code compiles, but the attribute is false by default.
While this can be useful for some simple HTML-like attributes, like disabled, this leads to hard-to-catch bugs.
Proposal: add a compiler define that forces boolean attributes to be required, just like any other ones.
For attributes like HTML's disabled, the developed can explicitly state @:attribute var disabled:Boolean = @byDefault false;
Perhaps this could also be equivalent: @:optional @:attribute var disabled:Boolean;
The text was updated successfully, but these errors were encountered:
Multiple times we've run into issues when some boolean attribute is added to a view, then we forget to pass it, the code compiles, but the attribute is false by default.
While this can be useful for some simple HTML-like attributes, like
disabled
, this leads to hard-to-catch bugs.Proposal: add a compiler define that forces boolean attributes to be required, just like any other ones.
For attributes like HTML's
disabled
, the developed can explicitly state@:attribute var disabled:Boolean = @byDefault false;
Perhaps this could also be equivalent:
@:optional @:attribute var disabled:Boolean;
The text was updated successfully, but these errors were encountered: