dom-expressions icon indicating copy to clipboard operation
dom-expressions copied to clipboard

lit-dom-expressions doesn't set value-less props as true

Open afranchuk opened this issue 1 year ago • 1 comments

If you have

html`<${Foo} bar><//>`

the Foo component gets passed "" as the value of the bar property. To better match JSX behavior, I think it would be useful to have this value be true instead. It's especially error-prone since "" is falsy.

afranchuk avatar Jan 24 '25 17:01 afranchuk

Yeah perhaps true would make more sense here, to be consistent with <custom-element bar>

trusktr avatar Mar 07 '25 02:03 trusktr