0

In lit-element @ Templates @ Bind properties to child elements (documentation) for

  • Attribute: <p id="${...}"></p>

  • Boolean attribute: ?checked="${...}"

  • Property: .value="${...}"

  • Event handler: @event="${...}"

    a pair of " is always used.

On the contrary, in lit-html @ Writing templates (documentation) a pair of " is never used, eg:

  • Attribute: <p id=${...}></p>
  • Boolean attribute: ?checked=${...}
  • Property: .value=${...}
  • Event handler: @event=${...}

Is there any reason for that? Is any style more preferable than the other?

Community
  • 1
  • 1
SONewbiee
  • 363
  • 2
  • 15

1 Answers1

1

There's no real difference, both are valid syntax and you should just use the style that suits you the best

Alan Dávalos
  • 2,568
  • 11
  • 19