Description
Posing this question as I spent some time looking elsewhere for an issue that was ultimately caused by my accidental use of :@text="prop"
when I meant @text="prop
.
A breaking change
Using :@text
it is currently possible to assign to a property called text
to a component, hypothetical example to ponder:
<mark-down :@text="post"></mark-down>
Where the component does something like:
<div @text="this.text"></div>
Changing this would need consistency with @html
which has a similar implied dynamic property behaviour.
Consistency or contrast
If considering a breaking change 😱, I suggest the problem here may be some misplaced consistency. Reusing the @
prefix for @text
and @html
is confusing as the value is dynamically evaluated without :
.
I would also like to suggest two different tokens for text/html is not better than one (i.e. if :@text === @text
).
An alternative, bigger breaking change
How about _text
and _html
in place of @text
and @html
?
- Clearer contrast with other attr/props
- No need to ever
:_text
/:_html
(they look weird anyway which is good I reckon). - Un-reserving
@text
/@html
for properties. - Distinguished from
:@text
,:@html
,:text
,:html
,text
,html
.