Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maintainer of lit-html here. AMA, especially if you're interested in how lit-html works, or where we're going next :)


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?


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: