News for hackers. Stuff that matters.
Re:WebComponent libraries lit-HTML and litElement released by tobr on Tuesday February 05, 2019 @04:15PM (#19089900)
Congratulations on releasing! I think it’s the right approach to use the platform rather than extending it a la JSX. I have a few questions:

1) What is the situation with the patent grant? I know React had something similar at an earlier point, which was heavily criticized and eventually removed.

2) Is there a way to precompile templates, sort of like what a lot of CSS-in-JS libraries do?

3) I was browsing through the source a couple of weeks ago, and it came across as a rather convoluted everything-must-be-a-class design, which I found surprising considering the simple functional style the library encourages externally. Do you think this is motivated over a more straightforward, procedural design?

Re:WebComponent libraries lit-HTML and litElement released by spankalee on Tuesday February 05, 2019 @05:13PM (#19090496)
Thanks!

1) I know basically nothing about patents, grants and licenses, so I can't comment there.

2) There are transforms to help minify lit-html templates, like https://github.com/asyncLiz/rollup-plugin-minify-html-litera... . See https://github.com/web-padawan/awesome-lit-html for more

3) lit-html requires objects with state and behaviors. Seems a perfect fit for classes. We usually get feedback that the source is very readable. I don't think there's any tension between the implementation using classes and the API surface being functional.