Lightning Web Components — Build Lightning Fast Salesforce Apps
Read on to discover how the Lightning Web Components fuses Web components programming model with Salesforce Metadata and services to deliver unparalleled performance and productivity.
Mike Rosenbaum, EVP of Product, Salesforce
Why Lightning Web Components?
It is like a newer version of Lightning Components with additional features.
- Knowledge Domain — Developers who know Web Components are familiar with Salesforce Lightning Web Components out-of-the-box. Aura is proprietary, so the better you know the web standards, the better you’ll have of skills that can be used outside Salesforce.
- Better Execution — It leverages built-in browser security features from Web Components standards, which reduces the level of custom coding, which means they run faster and are more consistent in how they ensure security. Moreover, events have a limited scope, so there is lesser processing required handling events.
- New Security Features — It gives better CSS isolation, DOM isolation, script isolation and limited event scope that facilitate a more consistent component design.
- ES6+ — We have better support for ES6 and ES7 that is not available in Aura. This enables you to do more with less coding. This also transpires code to work in IE 11 and other browsers which were not supported earlier.
- More Consistent Data Binding — The not so user-friendly two-way data binding has been eliminated. This pushes developers to coordinate the way in which data moves between components. It also means that data binding will work as expected, without any unforeseen problems from Aura.
- Mixins — You can even import accessible methods from other components and import specific Apex Methods from multiple classes. Moreover, Apex methods can be cached for improved performance.What Lightning Web Components means for Developers and Customers?
What Lightning Web Components means for Developers and Customers?
Cutting-Edge Advantages of Lightning Web Components
Boosted Performance — Developing Lightning Web Components does not involve complex abstractions to run on the browser, providing better performance to end users.
Ease of Use — Post development, the admins can deploy Lightning Web components with just clicks, not code to the applications.
How to create a Lightning Web Components framework?
LWC (Lightning Web Components) cannot be created directly from the developer console. You need to Setup Salesforce DX to create a Lightning component. After the SFDX setup, you need to do a few more things:
- Sign-up for Spring ’19 pre-release org
- Get your Salesforce DX plugin updated with Spring 19 pre-release. Run the command below in your terminal or command prompt.
sfdx plugins:install [email protected]
Once you finish this process, follow the Trailhead link to set up the basic project and create a basic Lightning Web Component.
Transition from Aura Components to Lightning Web Components
Developers using Aura framework to build lightning components can continue to work on it as the Aura components will continue to function like before. However, the new components can be created using Aura or the Lightning Web Component framework. For future developments, it is best if you use the Lightning Web Components.
Lightning Web Components Availability
It will be available for users by February 2019 in Enterprise, Unlimited, Performance and Developer editions.