State of play with Ionic 4

Hi all,

What is the state of play with Ionic 4?

In particular I’m KEEN on one of the promises to reduce startup times by moving to web components.

Has anyone had any joy looking at this or know of any docs I could read?

https://github.com/ionic-team/ionic/tree/v4

Thank you

1 Like

Hi @Judgewest2000, I know this is an old thread, but after the latest announcement regarding Ionic 4, I have a few questions of my own regarding this subject.

Does the move to Web Components mean that Stencil will be used instead of Angular, or will there be a choice of the two? I’m guessing that the build process will be compiling Angular to Web Components, in which case, why does Stencil have it’s own language to support it?

Since Polymer is switching to using ES6 modules instead of HTML Imports, how is Ionic going to handle this?

I am happy that Ionic is taking this kind of standards compliant move. I like the look of Stencil, but what will this mean to existing Ionic projects?

They’re not comparable. Stencil isn’t a framework. I expect it would become possible to swap React in for Angular, but you are still going to need some sort of framework to manage object lifecycle.

1 Like

To build on top of what rapropos said, most people won’t even need to know that Stencil exists or that it is using web components - everything will happen behind the scenes. The way in which people currently build applications with Ionic will remain almost identical, with just a few minor changes (as there was in the transition from 2.x to 3.x).

What it does mean, as was pointed out, is that in future instead of using ionic-angular you may also be able to use ionic-react or ionic-vue etc. when building apps if you wish. These won’t be available until later down the road, though.

1 Like

So, will the shift from Ionic 3 to Ionic 4 be analogous to the shift from Ionic 1 to Ionic 2, with a major change to the framework, or will it be similar to the shift from Ionic 2 to Ionic 3, which was essentially like an update.

Ionic 1 to 2 was like moving from Knockout to Angular - pretty much completely different without a discernible upgrade path.

Ionic 2 to 3 was more of an annoyance of an upgrade - nothing really.

Ionic 3 to 4 is looking to be similar but rendering components with a different engine and as @joshmorony has pointed out offer a level of separation away from Angular. Another minor detail for the vast majority of folks.

2 Likes

Another question I have is, if Stencil is intended to be web components compiler, why does it have it’s own language with templating, decorators, events and component life cycle as shown on the site? It seems like the general idea is to separate the framework from the language used (not that Angular is a language per se, but it sounds weird to say separate the framework from the framework).

So why does Stencil also include it’s own language/framework? Was that just an intermediary step? Should I start trying to build apps with the current Stencil docs? Is that what an Angular/Ionic app is going to be compiled into?

I know that everything will become clear in time, but I’m really curious now!

To answer my own question here, it was helpful to read the comments below the announcement. This link is the third when searching for Ionic 4 so I think it’s OK to continue the discussion here as well.

I think the creation of a minimal web component language is to facilitate creating components that do not rely on a framework and can use libraries from “vanilla JS” land. Sounds like a great idea. The Stencil samples run great. I think I will try and make a component for my co-workers Vue.js site and see how it goes.