Showing posts with label LWC. Show all posts
Showing posts with label LWC. Show all posts

May 23, 2021

Summer ’21

 

LWC Quick Actions:

    We can now use Lightning Web Components as Quick Actions! While you can currently do this with Aura Components, this new implementation brings some great new features! First off, there are TWO different types of LWC Quick Actions 

  1. Screen Actions and
  2. Headless Actions. 

Referece Link : Click Here

 

Aura Components in the ui Namespace Are Deprecated

  • Salesforce is ending support for Aura components in the ui namespace on May 1, 2021
  • Migrate to Lightning Web Components (LWC) whenever possibl
  • Replace the deprecated components with their counterparts in the lightning namespace.
  • These components are faster, more efficient, and they implement Lightning Design System styling out-of-the-box.

Example:

ui:actionMenuItem

Use lightning:menuItem with lightning:buttonMenu instead.

When migrating to Lightning Web Components, use lightning-menu-item with lightning-button-menu.

ui:inputText

Use lightning:input with text type instead.

When migrating to Lightning Web Components, use lightning-input with text type. 

 

Referece Link : Click Here 



Jan 4, 2021

Decorators

 Decorators

Decorators

Decorators are often used in JavaScript to modify the behavior of a property or function.
@api: Marks a field as public. Public properties define the API for a component. An owner component that uses the component in its HTML markup can access the component’s public properties.
All public properties are reactive, which means that the framework observes the property for changes. When the property’s value changes, the framework reacts and rerenders the component.
@track: Tells the framework to observe changes to the properties of an object or to the elements of an array. If a change occurs, the framework rerenders the component.
Prior to Spring ’20, you had to use @track to mark fields (also known as private properties) as reactive. You’re no longer required to do that. Use @track only to tell the framework to observe changes to the properties of an object or to the elements of an array. Some legacy examples may still use @track where it isn’t needed, but that’s OK because using the decorator doesn’t change the functionality or break the code. For more information, see this release note.
@wire: Gives you an easy way to get and bind data from a Salesforce org.