nerdexam
Salesforce

PDII · Question #331

Consider the following code snippet: When the component is deployed, an error is reported. Which two changes should the developer implement in the code to ensure the component deploys successfully?…

The correct answer is A. import getOrders from '@salesforce/apex/OrderController.getAvailableOrders'; D. import { LighningElement, wire } from 'lwc'. See the full explanation below for the reasoning.

Question

Consider the following code snippet:

When the component is deployed, an error is reported. Which two changes should the developer implement in the code to ensure the component deploys successfully? (Choose two.)

Exhibit

PDII question #331 exhibit

Options

  • Aimport getOrders from '@salesforce/apex/OrderController.getAvailableOrders';
  • Bimport getOrders from '@salesforce/apex/c.OrderController.getAvailableOrders';
  • Cimport { LightningElement, api ) from 'lwc';
  • Dimport { LighningElement, wire } from 'lwc';

How the community answered

(23 responses)
  • A
    83% (19)
  • B
    13% (3)
  • C
    4% (1)

Community Discussion

No community discussion yet for this question.

Full PDII Practice