htmlx-org / HTMLx

One Template to rule them all
588 stars 9 forks source link

Property bypass #2

Open developit opened 6 years ago

developit commented 6 years ago

Curious about the syntax here:

<button {disabled}>...</button>

It seems to diverge from the corresponding spread syntax:

<button {...foo}>...</button>

// which would imply one could also do:

<button {...{disabled}}>...</button>
Rich-Harris commented 6 years ago

Yeah, you could (can, in fact!) do {...{disabled}}. It's basically just intended as a convenient shorthand.