DEV Community

loading...

Discussion on: Stencil: I Think I Found My Frontend Home

Collapse
deciduously profile image
Ben Lovy Author

template approach

How tricky would this be to make work work with the tools as-is? I know the stencil tool does operate on a set of assumptions but at a glance this seems like the sort of thing you could do.

Collapse
ryansmith profile image
Ryan Smith

I think it can be done. I set up lit-html in Stencil and it seemed to work, but was kind of weird because I had to create a dummy element to attach lit-html to and call render() { render( document.querySelector("element") ) }. I'm sure that probably negated any compiler optimizations in Stencil. There might be a better way to do it, but I haven't explored it too much.