5

I found Lightning Web Component Open Source on the way of research Lightning Web Component.

I could find their difference only about merit of open source, but I want to know wether I can use LWC-open source as like LWC or not.

Is there any unusable lightning tag?

Is there any inconvenience point?

Is there any web site which is explaining about these differences?

I'm afraid of encounter unexpected specification change.

3

The core benefit of using Lightning Web component Open source is you can use outside salesforce platform. You can use it along with third party lib or other components in your web application.

With Lightning web component on the salesforce platform you get below benefits

  • Lightning base components are available and can reduce your development time as they offer declarative components. Note these base components are not available for open source
  • Lightning design system is baked into the base components
  • Lightning components build on the platform use locker services to establish great security
  • All third party lib need to be served from static resource which provides security benefits
  • Using data from the platform is lot easier as these provide excellent support for working with apex and lightning data service

If you are building a salesforce app for salesforce platform use lightning web component and leverage all benefits it provides.

While if you are planning to build an app that should reside outside salesforce , salesforce web components open source is a great choice.Note that you wont have access to base components that salesforce provides and to get data from salesforce you will use salesforce REST API.

There is a great Trailhead Trail for the Lightning Web components open.

NOTE- Converting lightning web component built using open source lightning web component to salesforce specific lightning web component is relatively straight forward as well and this Trailhead module covers in detail.

  • "Lightning base components" means lightning tag, like lightning-input? – Hayato Oct 15 '19 at 6:37
  • That's correct. Pre built components .Another example could be lightning-record-form – Mohith Shrivastava Oct 15 '19 at 11:07
  • Conversely, can't we use any Lightning base components in open source version? – Hayato Oct 16 '19 at 0:41
  • No we cannot. We cannot use those base components as they are designed to work in salesforce platform only – Mohith Shrivastava Oct 16 '19 at 0:48
  • I see. We must use Lightning Design System if we need salesforce-like UI, right? – Hayato Oct 16 '19 at 0:55

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.