-
-
Notifications
You must be signed in to change notification settings - Fork 369
Closed as not planned
Labels
Description
These may be two very different reports with different opinions for each, so please let me know if you'd like me to separate them.
Example 01: Passing attributes as-is
<twig:Comp {{ attributes }} /> {# ❌ original question/report #}
<twig:Comp {{ ...attributes }} /> {# ✅ the correct way #}
A realistic usecase for this is creating higher-order (wrapper) components.
Example 02
<twig:Comp
{% if condition %}
disabled
{% endif %}
/>
Most notably, without these conditions, boolean attributes seem impossible (?), but would also just make the syntax more consistent with the way Twig is normally written.
Both result in:
Expected attribute name when parsing the "<twig:Comp" syntax.