Salesforce Lightning Component Interview questions

  • by

Today I will share a number of lwc interview questions with you. This is the first post of the LWC interview question series.

  1. What’s Aura Framework

Aura is an open source UI framework designed by Salesforce for building powerful web apps for mobile and desktop devices. Salesforce uses Aura to create apps, like Lightning Experience and Salesforce1.

  1. What’s distinction between Application event and also component event

Component event: Component event is utilized to speak with parent component working with bubble event.

Application event: Application events: to broadcast to various other pieces without solely ancestors. Applications events are able to speak with numerous parts which can be curious by the event.

  1. What’s the usage of tools in lightning component

implement is utilized to execute several interface in lightning component. e.g. flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId

  1. What’s aura:registerevent in lightning component

A component registers that it might fire an event by using five. Just how can we subscribed to an event in lightning component.

Use in the markup of the handler component.

  1. Just how can we communicate between 2 component.

Lightning component is able to communicate utilizing event communication framework. Read more about component communication patterns

  1. How you can include lightning component in visualforce page.

Lightning component could be put into visualforce page using ltng:outApp eight. What’s Aura Definition Bundle

Aura definition bundle has following items

Component: UI for lightning component

controller.js: Contains client side controller techniques to deal with events in the portion.

helper.js: JavaScript functions which could be named out of virtually any JavaScript code in a component’s bundle

style: Contains models for the portion.

design: File necessary for elements utilized in Lightning App Builder, Lightning web pages, or maybe Community Builder.

renderer: Client side renderer to override default rendering for a portion.

documentation: A description, sample code, and one or even numerous references to example components

SVG: Custom icon resource for elements applied to the Lightning App Builder or maybe Community Builder.

  1. What’s aura:attribute

Attributes are as member variables on a course in Apex. They’re typed fields which are set on a certain example of any component, and may be referenced from within the component’s markup making use of an expression syntax.

  1. What’s lightning: or perhaps ui: in virtually any Lightning Component?

lightning: and ui: are 2 namespaces for core lightning component. The lightning namespace components are enhanced for typical use cases.

  1. Just how can we extend some component

Lighting portion could be extended working with extensible=”true” attribute in aura:component