Lightning Component Interview questions for lightning developers/ Admins/ Consultants
1. What is Aura Framework
Aura is an open-source UI framework built by Salesforce for developing dynamic web apps for mobile and desktop devices. Salesforce uses Aura to build apps, such as Lightning Experience and Salesforce1.
2. What is difference between Application event and component event
Component event: Component event is used to communicate with parent component using bubble event.
Application event: Application events: to broadcast to other components and not exclusively ancestors. Applications events can talk to many components that can be interested by the event.
3. What is the use of implements in lightning component
implement is used to implement multiple interface in lightning component. e.g. flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId
4. What is aura:registerevent in lightning component
A component registers that it may fire an event by using <aura:registerevent>
5. How can we subscribed to an event in lightning component.
Use <aura:handler> in the markup of the handler component.
6. How can we communicate between two component.
Lightning component can communicate using event communication framework. Read more about component communication patterns
7. How to add lightning component in visualforce page.
Lightning component can be added to visualforce page using ltng:outApp
8. What is Aura Definition Bundle
Aura definition bundle contains following items
Component : UI for lightning component
controller.js : Contains client-side controller methods to handle events in the component.
style: Contains styles for the component.
design: File required for components used in Lightning App Builder, Lightning pages, or Community Builder.
renderer: Client-side renderer to override default rendering for a component.
documentation: A description, sample code, and one or multiple references to example components
SVG: Custom icon resource for components used in the Lightning App Builder or Community Builder.
9. What is aura:attribute
Attributes are like member variables on a class in Apex. They are typed fields that are set on a specific instance of a component, and can be referenced from within the component’s markup using an expression syntax.
10. What is lightning: or ui: in any Lightning Component?
lightning: and ui: are two namespaces for core lightning component. The lightning namespace components are optimized for common use cases.
10. How can we extend any component
Lighting component can be extended using extensible=”true” attribute in aura:component