In this post, find an important salesforce lightning interview questions and answers. In case if you are looking for an answer to any other questions, put it in the comments section below.
1. What
is salesforce lightning?
Ans: Salesforce lightning is the latest version of Salesforce CRM with user interface changes and improved
performance. Lightning works on a component-based framework that is capable of
handling rendering of respective components instead of loading complete
page.
2. What
is the difference between aura and LWC components?
Ans: Aura is an open-source framework that is used to build client-server web applications. Salesforce
lightning is initially built on the top of the aura framework, that consists of a reusable base
components.
The Lightning web component is a new
programming model to develop lightning components in the Salesforce. It is
built on the code that runs natively in the browsers. It is also lightweight
which delivers great performance and it comes up with the latest web standards.
3. What
is the bubble and capture phase in the lightning framework?
Ans: Bubble - the component event is propagated
from the source to the root component, which starts from bottom to top in the
hierarchy. By default, an event handler is in a bubble phase
Capture - the component event is propagated from the source to the root directly and comes from the root to source in the hierarchy,
which is top to bottom approach. We must mention phase = 'capture' for the event
handler in the component
4. What is the difference between methods and
lightning events?
Ans: Methods are used to communicate down in
the containment hierarchy.
For example, a parent component calls
an aura:method on a child component that it contains.
To communicate up the containment hierarchy,
fire a component event in the child component and handle it in the parent
component.
5.
What
is the difference between application and component events?
Ans: Component events are used to
capture events from one component to another component when they are in the
hierarchy whereas the application events are used to communicate between the
two components when they are not in the hierarchy.
6.
What
is an attribute and event in salesforce lightning?
Ans: Attributes are variables in
the lightning experience which are used to store certain values and the same is
used to execute conditional logic in the component user interface. For example,
attribute values can be used to hide or show elements in the component.
Events are specific actions that
are called based on different user responses in the user interface. We have
application, component, and standard events in the salesforce lightning
experience.
7. What are the ways to store data in the client or different types of caching in salesforce lightning?
Ans: LDS [Lightning Data Service], Storage
actions [action.setStorable();] and Custom caching
8.
List
different component bundles available in salesforce lightning?
Ans: Component, Controller,
Helper, Style, Documentation, Renderer, Design, and SVG
9.
What
is $A.enqueueActoion in salesforce lightning?
Ans: It is a standard action or
event in the salesforce lightning which helps to trigger an action at the
server-side. Without this line of code in the component controller or helper, server-side
operations are not fired.
10. Can we refer two or more apex
controller classes within a single component in salesforce lightning?
Ans: No, the lightning framework supports only one Apex controller class to be referenced inside a
single lightning component.
11. What is Salesforce Lightning out
functionality?
Ans: It is a capability to include lightning
components within the visualforce pages
12. Can we extend one component in
another component in salesforce lightning?
Ans: Yes, we can extend the
components by using Extensible = "true"
Have any specific questions to ask us? Start the conversation in the comments section below. Thanks for your time.
READ MORE | Salesforce lightning interview questions - Part 2
Have any specific questions to ask us? Start the conversation in the comments section below. Thanks for your time.
READ MORE | Salesforce lightning interview questions - Part 2
0 Comments