8

I am learning LWC, and I found out that I should not use as it's ECMASCRIPT 7 which means that it's using templates, shadow dom, web components and most of browsers are not ready for that.

My question is : what is the level of maturity of LWC ?

Can I create a LWC in my angular app, and push it online in my website for example ? what are the risks ? should I stay on Aura ?

5

I am learning LWC, and I found out that I should not use as it's ECMASCRIPT 7 which means that it's using templates, shadow dom, web components and most of browsers are not ready for that.

LWC polyfills everything not supported by the browser. There is no risk in using LWC, as all supported browsers will support LWC for now, and in the future. As browsers catch up to Web Component technology, they will gain increased performance compared to Aura Components, which will never be "browser-supported".

My question is : what is the level of maturity of LWC ?

It's ahead of browser technology, and should be considered fully mature at this point.

Can I create a LWC in my angular app, and push it online in my website for example ?

In theory, yes, but mixing frameworks is a major performance hog. You can create standalone LWC apps outside of Salesforce without the need for Angular, Backbone, Bootstrap, or other frameworks.

what are the risks ?

LWC is ahead of web browsers, so there's not any inherent risk over using Aura.

should I stay on Aura ?

That's up to you. LWC has better performance, better browser support, and will be supported further down the road than Aura itself (most likely).

|improve this answer|||||
  • Thank you for your answer. But if I check caniuse.com and search for "web components" it looks like things like "shadow dom", "templates" .. are not supported in IE, and only on really recent Chrome, Fire fox ( caniuse.com/#search=web%20components ) – BestAboutMe Feb 3 at 15:16
  • @BestAboutMe Correct. As I stated, browser support is not required to use LWC. Do you log in to Salesforce and use Lightning? It's very nearly 100% LWC at this point (go look at the page source!). Do you use lightning:input or other lightning:* elements? Those are almost all LWC as well (write a Lightning App, include a few, and look at the source!). The fact is, LWC works so well that it's almost completely replaced Aura components, and the performance has been noticeable. There's no reason to not use LWC compared to Aura, unless it's one of those few unsupported use cases. – sfdcfox Feb 3 at 15:32
  • Thank you for taking time and answering again. Login to salesforce via IE is not working, it redirects me to chrome – BestAboutMe Feb 3 at 15:41
  • 1
    @BestAboutMe Almost everyone recommends that IE not be used, even Microsoft. Instead, you should be using Edge if you want to use Microsoft technology, or Chrome, Firefox, Safari, or many of the emergent variants (e.g. Bravo). Of course, if you need 100% support, your app will need to degrade gracefully, meaning you'd need two support two UIs, minimum, even if you were using Angular, etc. – sfdcfox Feb 3 at 15:51
3

Just be careful... the use of LWC is clearly a good thing to do in the future, but if it is like aura technology, that took months/years to be stable & mature despite the great announcements , beware of ascending compatibility breaks by Salesforce platform upgrades, like it happened with :

  • LockerService in the past (almost everything to recode)
  • ui: namespace components today (end date announced)

My personal advice: let the others be SFDC's beta testers, then use the technology once it is kind of mature, and is improved by the appropriate platform tools and patterns instead of providing only low-level development capabilities

An additional "con" is that today you can include a LWC inside an Aura component, but not the contrary (meaning that if you have to mix both technologies, it could be tricky)

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.