Valid PDI Dumps shared by ExamDiscuss.com for Helping Passing PDI Exam! ExamDiscuss.com now offer the newest PDI exam dumps, the ExamDiscuss.com PDI exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDI dumps with Test Engine here:
Which three code lines are required to create a Lightning component on a Visualforce page? Choose 2 answers
Correct Answer: A,C
* To embed a Lightning component in a Visualforce page, the following are required: * A:<apex:includeLightning/>is necessary to include the Lightning framework on the Visualforce page. * C:$Lightning.use()initializes the Lightning app and is essential for using Lightning components. Why not other options? * B:$Lightning.createComponentis used for creating a specific Lightning component but is not enough on its own. * D:<apex:slds/>includes SLDS (Styling) but is unrelated to embedding Lightning components. * E: This is not a valid syntax. : Embedding Lightning Components in Visualforce
Recent Comments (The most recent comments are at the top.)
Yassine - Oct 20, 2026
Answer: A, B and C
Your question says “three” in the title but “Choose 2” at the end. Three options are required, so I’m going with the “three” wording. The options have OCR typos, and I’m reading them as follows:
A. <apex:includeLightning/>: This loads the Lightning Components for Visualforce JavaScript library (lightning.out.js), which has to be on the page first. C. $Lightning.use: This points to the Aura application that declares your component’s dependencies (an app that extends ltng:outApp) and runs a callback once it’s ready. B. $Lightning.createComponent: This creates the component and inserts it into a DOM element on the page. It is called inside the $Lightning.use callback. xml <apex:page> <apex:includeLightning/> <div id="lightningContainer"></div> <script> $Lightning.use("c:myApp", function() { $Lightning.createComponent("c:myComponent", { label: "Hello" }, "lightningContainer", function(cmp) { /* component created */ } ); }); </script> </apex:page>
The other options don’t fit:
D. <apex:slds/>: This loads the Lightning Design System styles. It’s useful for styling, but it isn’t needed to create the component. E. $Lightning.useComponent: This isn’t a real API. You may be thinking of $Lightning.use....
Recent Comments (The most recent comments are at the top.)
Answer: A, B and C
Your question says “three” in the title but “Choose 2” at the end. Three options are required, so I’m going with the “three” wording. The options have OCR typos, and I’m reading them as follows:
A. <apex:includeLightning/>: This loads the Lightning Components for Visualforce JavaScript library (lightning.out.js), which has to be on the page first.
C. $Lightning.use: This points to the Aura application that declares your component’s dependencies (an app that extends ltng:outApp) and runs a callback once it’s ready.
B. $Lightning.createComponent: This creates the component and inserts it into a DOM element on the page. It is called inside the $Lightning.use callback.
xml
<apex:page>
<apex:includeLightning/>
<div id="lightningContainer"></div>
<script>
$Lightning.use("c:myApp", function() {
$Lightning.createComponent("c:myComponent",
{ label: "Hello" },
"lightningContainer",
function(cmp) { /* component created */ }
);
});
</script>
</apex:page>
The other options don’t fit:
D. <apex:slds/>: This loads the Lightning Design System styles. It’s useful for styling, but it isn’t needed to create the component.
E. $Lightning.useComponent: This isn’t a real API. You may be thinking of $Lightning.use....
A B and C are correct. But mistyped.