LWC
- LWC uses core Web Components standards (Native browser APIs) and provides only what’s necessary to perform well in browsers supported by Salesforce.
- Because it’s built on code that runs natively in browsers, LWC is lightweight and delivers exceptional performance.
- Most of the code you write is standard JavaScript and HTML.
- LWC, you have a .html file and uses standard DOM events.
- Attributes are not defined in markup but in javaScript file.
- Events dispatched by LWC do not have to be registered in the markup and need to be fired directly in JavaScript. And event handlers are attached in the standard static or dynamic way
- Meta file(.-meta.xml) file binds it to Salesforce.
- A better automated unit testing framework like Jest.
- Cannot edit or develop LWC components in the Developer Console.
- Lightning Message Service can be used to communicate between Aura components and LWC.
- Lightning Data Service shares its cache between Aura and LWC.
Aura
- Aura framework needs to implement a proprietary component model, proprietary language extensions, and proprietary modules.
- Aura, you have .cmp file and uses custom Aura events.
- Aura components can include LWC.