<targetConfig targets="lightning__RecordPage">
<objects>
<object>Account</object>
</objects>
</targetConfig>
</targetConfigs>
|
Aura |
LWC |
|
Uses aura:attribute, aura:method, and events |
Uses @api, custom events, and Pub-Sub |
|
More boilerplate code |
Cleaner, modern JS syntax |
|
Two-way binding supported |
Only one-way binding with event handling |
|
@wire (Declarative) |
Imperative (Programmatic) |
|
Auto-fetches and auto-refreshes |
Runs only when you call it manually |
|
No control over when it runs |
Full control (e.g., after button click) |
|
Less code, no error handling |
You handle success/error manually |
|
connectedCallback() |
renderedCallback() |
|
Runs once when inserted |
Runs after every render |
|
Best for Apex calls |
Best for DOM access |
|
Happens before UI appears |
Happens after UI is visible |