lightning components interview questions

Salesforce Lightning Interview Questions
  • What is Salesforce Lightning?
  • What are the tools included in lightning ?
  • What is Aura? …
  • Is Lightning an MVC framework?
  • What is difference between Visualforce Components and Lightning Components?
  • Where we can display lightning component?

There is no doubt how Salesforce has been changing not only the way businesses operate but also how they serve their customers especially with products like Salesforce Lightning. It is a component-based framework for development from SFDC aimed at simplification of processes for business users. Due to its out of box component many top companies like Adidas, Cisco, Accenture among others are using Salesforce Lightning to alleviate their development as well as application performance.

Most Important and Commonly Asked Salesforce Interview Questions on Lightning Web Components

What are the different programming models available for Lightning components?

There are 2 different programming models available for Lightning components. The first is utilising the Aura framework to build out Aura components, the second is utilising the newer Lightning Web Components (LWC) framework.

Why would you choose one programming model over the other?

Lightning Web Components should be the go-to approach for development due its increased performance, ease of development and alignment with modern web standards. However, there are some scenarios where Aura components are still required, as of Summer ’21, these include building community templates and URL accessible components, although LWC is quickly reaching feature parity.

Why we use of THIS CSS class? All top-level elements in a component have a special THIS CSS class added to them. This, effectively, adds namespacing to CSS and helps prevent one component’s CSS from overriding another component’s styling. The framework throws an error if a CSS file doesn’t follow this convention.

Difference between bound and unbound expressions. Bound expression {!expression}: Any change to the value of the childAttr attribute in c:child also affects the parentAttr attribute in c:parent and vice versa. When we use a bound expression, a change in the attribute in the parent or child component triggers the change handler in both components.

Salesforce DX includes a code analysis and validation tool usable via the Salesforce CLI. Use force:lightning:lint to scan and improve your code during development. Validation using the Salesforce CLI doesn’t just help you avoid Lightning Locker conflicts and anti-patterns. It’s a terrific practice for improving your code quality and consistency, and to uncover subtle bugs before you commit them to your codebase.

A lightning tag has inbuilt SLDS we do not need to put extra effort to improve the look and feel, We can handle bad input and provide user validations. The lightning namespace components are optimized for common use cases. Beyond being equipped with the Lightning Design System styling, they handle accessibility, real-time interaction, and enhanced error messages.

What are component in Salesforce Lightning? Components are the functional units of Aura, which encapsulate modular and reusable sections of UI. They can contain other components or HTML markup. The public parts of a component are its attributes and events. Lightning provide out of thr box components in lightning, aura, ui and force namespaces.

How do we develop Lightning components?

Using two programming models, we can develop the lightning components;

  • Native Aura Components model
  • Lightning web components model.
  • FAQ

    What is lightning web components interview questions?

    Lightning Web Components Interview Questions
    • 2 What is the file structure of Lightning Web Components. …
    • How can you display components HTML conditionally. …
    • 4 How we can bind data in LWC. …
    • How we can pass data from HTML to JS controller? …
    • How we can iterate list in Lightning Web Component (LWC) …
    • Can we display multiple templates.

    What is a component in lightning?

    Lightning web components are custom HTML elements built using HTML and modern JavaScript. Lightning web components and Aura components can coexist and interoperate on a page. Configure Lightning web components and Aura components to work in Lightning App Builder and Experience Builder.

    What is the difference between V and C in lightning component?

    The value providers for a component are v (view) and c (controller). A component’s attribute set. This value provider enables you to access the value of a component’s attribute in the component’s markup. All components have a v value provider, but aren’t required to have a controller.

    How many types of lightning components are there?

    There are three different types of Lightning Components you should know about.

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *