Newer Version Available

This content describes an older version of this product. View Latest

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.
  • 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.

Out-of-the-box Components
Comes with an out-of-the-box set of components to kick start building apps. You don't have to spend your time optimizing your apps for different devices as the components take care of that for you.
Rich Custom Component Ecosystem
Create business-ready components and make them available in the Salesforce mobile app, Lightning Experience, and Experience Builder sites. Salesforce mobile app users access your components via the navigation menu. Customize Lightning Experience or create your own Lightning pages using drag-and-drop components in the Lightning App Builder. Create and customize Experience Builder sites using Experience Builder. Additional components are available for your org in the AppExchange. Similarly, you can publish your components and share them with other users.
Fast Development
Empowers teams to work faster with out-of-the-box components that function seamlessly with desktop and mobile devices. Building an app with components facilitates parallel design, improving overall development efficiency.
Components are encapsulated and their internals stay private, while their public shape is visible to consumers of the component. This strong separation gives component authors freedom to change the internal implementation details and insulates component consumers from those changes.
Device-aware and Cross Browser Compatibility
Apps use responsive design and support the latest in browser technology such as HTML5, CSS3, and touch events.