Live data from Hacker News

Stencil – A reusable web component generator

stenciljs.com

41–50 of 107 posts

Re: Stencil – A reusable web component generator

#41

Hey all, founder of Ionic (team behind Stencil) here. Didn't expect to see this up on HN so soon (released this morning), thanks for understanding there's still rough edges with docs, etc We built Stencil for a selfish reason: we needed more mobile web performance for Ionic apps being deployed as PWAs (in addition to App Store apps) and we were struggling getting that with traditional framework component/bundle appro…

How Stencil will change Ionic (Angular) apps? As far I understand it will add real lazy loading, which should greatly reduce startup time. What are other benefits?

What about Ionic v4 apps? Will Angular still be used? How we are going to write our app components, they will be based on Angular or Stencil?

What about Cordova hybrid apps? Do you plan to support them or focus exclusively on PWA apps?

Re: Stencil – A reusable web component generator

#42
post #41

Hey all, founder of Ionic (team behind Stencil) here. Didn't expect to see this up on HN so soon (released this morning), thanks for understanding there's still rough edges with docs, etc We built Stencil for a selfish reason: we needed more mobile web performance for Ionic apps being deployed as PWAs (in addition to App Store apps) and we were struggling getting that with traditional framework component/bundle appro…

How Stencil will change Ionic (Angular) apps? As far I understand it will add real lazy loading, which should greatly reduce startup time. What are other benefits? What about Ionic v4 apps? Will Angular still be used? How we are going to write our app components, they will be based on Angular or Stencil? What about Cordova hybrid apps? Do you plan to support them or focus exclusively on PWA apps?

First of all, Cordova/App Store apps are still our main focus. However, we are incredibly excited about PWAs and will adjust based on where the market goes. This stuff is still new!

Second of all, we will continue to support building Ionic apps with Angular. In fact, you shouldn't really notice any difference, we've just turned a number of the Ionic components into web components. It'll be fairly seamless but performance on load and code size should improve by a fair margin.

Long term? It's hard to argue against web components being a superior deployment option for both our components and your apps, so if developer preference shifts in that direction we might push stencil/web components as the default. Time will tell

Re: Stencil – A reusable web component generator

#43

I'm not sure I'm understanding the point behind this. If the main point is to allow people to reuse components (i.e. a calendar widget) across frameworks, then good, but it's going to be quite messy when things start to get complicated and we start hitting integration problems, because some guy on the Internet writing a widget is not going to test & maintain it on all frameworks. It also bothers me the whole Typescri…

It was announced today at Polymer Summit, please take it a look: https://youtu.be/rY233a4tp2s?t=2h6m50s

Maybe this one: https://www.youtube.com/watch?v=UfD-k7aHkQE

Re: Stencil – A reusable web component generator

#44
post #41

Earlier quoted context omitted.

How Stencil will change Ionic (Angular) apps? As far I understand it will add real lazy loading, which should greatly reduce startup time. What are other benefits? What about Ionic v4 apps? Will Angular still be used? How we are going to write our app components, they will be based on Angular or Stencil? What about Cordova hybrid apps? Do you plan to support them or focus exclusively on PWA apps?

First of all, Cordova/App Store apps are still our main focus. However, we are incredibly excited about PWAs and will adjust based on where the market goes. This stuff is still new! Second of all, we will continue to support building Ionic apps with Angular. In fact, you shouldn't really notice any difference, we've just turned a number of the Ionic components into web components. It'll be fairly seamless but perform…

First off, thanks for all your work with the Ionic framework! I use it in education as part of an undergraduate course on cross-platform development, and the students thoroughly enjoy the developer experience.

Question: Do you have an ETA for release of the "Web Componentized" Ionic components? So looking forward to it, especially the potential of teaching e.g. Vue + Ionic components instead of having to put so much focus and effort on teaching Angular (which is a great framework, but requires a lot).

Re: Stencil – A reusable web component generator

#45
post #36

Huh, that's a rather interesting approach to building Web Components. I'll have to see if it gets anywhere, but the idea has potential, and feels like it avoids many of the pain points of Polymer (although I'm not quite sure yet which you'll get in return).

Yeah, indeed it does look really nice, the API feels a bit weird though, not sure why lifecycle events are named after react.

Re: Stencil – A reusable web component generator

#46
post #45
post #36

Huh, that's a rather interesting approach to building Web Components. I'll have to see if it gets anywhere, but the idea has potential, and feels like it avoids many of the pain points of Polymer (although I'm not quite sure yet which you'll get in return).

Yeah, indeed it does look really nice, the API feels a bit weird though, not sure why lifecycle events are named after react.

We are fans of react and think the events fit the component model well, it's not a perfect 1-1 though

Re: Stencil – A reusable web component generator

#48

If we use third party library code in multiple stencils. Will they be included separately in each one of them. Let's say d3 for graphics?

Yes right this second, but next on our list is providing a seamless solution to dependency dedupe. Not yet ready but it's promising.

Re: Stencil – A reusable web component generator

#49
post #2

Gosh, the content is illegible on Chrome and Windows 8. 14px and a lightweight font does not make for happy reading.

Sure looks terrible on Edge, Chrome, and Firefox on Windows 10. Gray on gray makes for terrible contrast.

Hello all! We just deployed a new version of the site that should solve some of these problems, thanks for the feedback.

Re: Stencil – A reusable web component generator

#50
post #27

Here's a new library to solve a problem you don't have yet.

WebComponents in general are a solution in search of a problem.

Despite being 6 years in development:

- they basically delivered none of the original promises

- they are extremely cumbersome to use without a library/framework on top (Polymer is the jQuery of WebComponents)

- they are plagued by multiple problems and shifts in the ecosystem (browsers don't want to support `is=`, HTML imports are being dropped in favour of ES6 imports)

- they have multiple problems integrating with existing frameworks: https://custom-elements-everywhere.com (basically any framework that bastardises HTML syntax is ok, anything relying on Javascript only is in trouble)

Don't hold your breath for the next couple of years as everyone tries to figure out how to work with them.

Post reply on HN