picostitch
crafting (and) JavaScript

django-cotton – First Impressions

No enclosed tags

throws an error :(

<c-button {% if url %} url="{{ url }}" {% else %} style="visibility: hidden;" {% endif %} />

Passing attrs to nested component is complicated

cotton/button/close.html used like so: <c-button.close/>

<c-button
  :attrs="attrs"
></c-button>

cotton/button.html

<button 
  {{ attrs.attrs }}
></button>

Feels like it could be simpler