loading...

re: Stencil: I Think I Found My Frontend Home VIEW POST

FULL DISCUSSION
 

I also landed on Stencil after trying all of the other big frameworks and built my site with it. It just feels right. It seems like other front-end libraries are "hacking" the web to get it to do their bidding, while Stencil embraces it and provides the same convenience as those frameworks. It is hard to justify the investment of learning a front-end framework that is not compatible with anything else and may eventually be replaced by the next big thing in 3-5 years. My only complaint so far is using JSX with it, I think I would prefer a template approach instead, but everything else has worked well.

 

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.

 

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.

 

My first impression was the same as yours, I would have rather like to use template, but now? I would like to use TSX everywhere 🤣

Cherry on top, I think, it could help developers with prior React experience to easily step in Stencil and likewise, for developers without React experience, it could help to step in React.

code of conduct - report abuse