|
|
|
|
|
by djrenren
928 days ago
|
|
Well, this is only sort of true. When you’re writing HTML you’re restricted to attributes but custom elements are JavaScript objects and are free to respond to property updates on the object. Relying solely on strings is a limitation of your templating engine. For example lit-html templates support syntax like: <my-element .someProp=${new Foo()}></my-element> |
|
Note that it's still possible to pass complex objects to native we components but only imperatively via properties so it's a lot higher friction (as it should be).