What is the correct definition of a Lighting Web component property that uses the getAccounts method?

An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for Lighting Web components to use.

What is the correct definition of a Lighting Web component property that uses the getAccounts method?
A . @AuraEnabled(getAccounts, ‘$searchTerm’)
accountList;
B . @wire(getAccounts, ‘$searchTerm’)
accountList;
C . @AuraEnabled(getAccounts, {searchTerm: ‘$searchTerm’})
accountList;
D . @wire(getAccounts, {searchTerm: ‘$searchTerm’})
accountList;

Answer: D

Explanation:

https://developer.salesforce.com/docs/component-library/documentation/en/48.0/lwc/lwc.data_wire_service_about

Latest PDI Dumps Valid Version with 191 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments