Learn Salesforce Anywhere Anytime

Theme Switch

Aura vs LWC


S.NoAura ComponentsLWC
1.Development is aura framework-specific and has a .cmp file extension.The Lightning Web Components are based on the 2019 web stack model, and it is a new programming model build on Web standards.
2.Aura components use the developer console to develop various use casesThey cannot be developed or edited in the developer console, requiring an IDE such as VSCode.
3.It uses Aura custom EventsIt uses standard DOM Events
4Attributes are defined in markup to hold different variable valuesInstead of defining attributes in markup, they are defined in javascript, where the rest of the component logic is present.
5.To communicate between two DOM hierarchy Application, require Event is usedWhereas LWC uses Lightning Message Service to enable communication between LWC in different DOM hierarchy and also with Visualforce pages and Aura components
6We can embed LWC in AuraAura cannot be embedded in Lightning Web Component
7Data binding is bi-directionalData binding is unidirectional  
8To pass information from parent to child component, attributes are usedWhereas it uses the property to pass information down to the child
9.Testing a bit painstakingIt is straightforward here.LWC has a potent tool, JEST, for testing.
10Attributes need to be explicitly set using the component.set() to mention any change.Changes can be observed using the @track decorator.

Conclusion: Transition of Aura to Lightning Web Component has made significant changes in terms of better and efficient performance and has also increased the productivity.