These are chat archives for jdubray/sam

3rd
Nov 2017
Jean-Jacques Dubray
@jdubray
Nov 03 2017 15:22
Everything you wanted to know about lit-html Please make sure your read the section on "Benefits of JSX"
Fred Daoud
@foxdonut
Nov 03 2017 18:28
@jdubray :thumbsup:
@jdubray did you run those benchmarks locally?
from https://github.com/krausest/js-framework-benchmark?
Holger Winkelmann
@hwinkel
Nov 03 2017 19:15
in terms of "maturity" have you seen the discussion here PolymerLabs/lit-html#32
Paolo Furini
@pfurini
Nov 03 2017 20:21
Apart this lengthy discussion, lit-html lost me right in the readme: lit-html is very new, under initial development, and not production-ready.
Plus this: out-of-the-box it only runs in Safari 10.1, Chrome 61, and Firefox 54 (behind a flag).
There are enough cutting edge, unstable, and experimental libs out there, that I surely find a better alternative with broader support and more focus on real-world usage. Stencil is among the latter
Paolo Furini
@pfurini
Nov 03 2017 20:30
The first thing I search for in the README is the support section.. and stencil compiled components will run in every browser my clients use today
Jean-Jacques Dubray
@jdubray
Nov 03 2017 22:51
@pfurini IMHO, what's important is that it's possible and probably where things will be going. I know you won't like my answer, but you can use lit-html today by downgrading to ES6 template literals. Once lit-html is ready you just replace you default TL html tag.
function html(strings, ... values) {
   let str = '';
   strings.forEach((string, i) => {
       str += string + values[i];
   });
   return str;
}
@hwinkel I would expect there will be many libraries using the same principle, they will differ from the way they manipulate the DOM. Had I known about the "tag" concept in template literals I may have coded my own. What's important is that we have now a Front-End template technology that is aligned HMTL5/ES6/CSS3. We no longer have to deal with custom template definitions from JSX to Angular and beyond.
@foxdonut no, I didn't run them myself, someone else did.