dschulten (8) [Avatar] Offline
#1
A more recent development in webcomponents is to use a compiler to create vanilla Javascript bundles at build time. Examples are Svelte https://svelte.technology and Stenciljs https://stenciljs.com.

Maybe that is something to consider when you get to the building chapter smilie
430326 (1) [Avatar] Offline
#2
Interesting! Thanks for sharing! This is a hard one, I totally dig the fact that it compiles down to a plain web component. I don't dig the fact that you're learning a different toolchain, though (to be fair, it's not like the toolchain isn't made up of some very common and popular pieces). The syntax and lifecycle kinda reminds me of my limited React exposure - and I've seen some demos for compiling a React component down in the same way.

I do think I want the book to focus on stuff that everyone can use without buying into a specific workflow like this - but it certainly can't hurt to mention things like this, because as much as I love working with Web Components, we'll always invent better ways on top of the core tech.

I had planned for my build chapter to focus on taking core Web Component creation and enabling them to work with older browsers that don't support the newer APIs or ES6 features. What you bring up might be a good topic for another spot in the book - I've been toying with the idea for showing competing component workflows like with React and Angular, and I have a step by step calculator React project that I converted to Web Components in the book's Github repo.

So, all thats to say, thanks! You might be just giving me more ammunition for another chapter I've been pondering