Why Should I Use Lightning Web Components instead of Visualforce?
For new development, Salesforce recommends using Lightning Experience low-code tools and Lightning web components over Visualforce for the most modern, performant, and responsive functionality. Lightning Platform provides various ways for advanced administrators and developers to build custom functionality, and it supports newer, complex business processes that aren’t available with Visualforce.
If you have existing Visualforce components, converting them to Lightning web components provides an opportunity to refine and improve your apps. Take time to evaluate the overall design and usability of each component and its equivalent. Work with your designer to choose the best way to align your components with the modern look and feel of the Lightning Experience user interface. For inspiration and some sample code, see the component blueprints provided in the Lightning Design System.
As you begin developing Lightning web components, decide when to reuse a Visualforce page within Lightning Experience and when to rebuild it as a Lightning web component. Consider rebuilding when you want:
- A more engaging and responsive user experience.
- Support for the latest Web Content Accessibility Guidelines (WCAG).
- An experience that’s easy to optimize for multiple device form factors.
- Better performance in your app.
Lightning Web Components
Lightning web components are custom HTML elements built using HTML and modern JavaScript. They use core Web Components standards and provide only what’s necessary to perform well in browsers supported by Salesforce. Because they’re built on code that runs natively in browsers, Lightning web components are lightweight and deliver exceptional performance.