New and Changed Modules for Lightning Web Components

Modules enable you to do more with Lightning web components.

New Module

The following module is now available.

This module includes one wire adapter, getNavItems. Use this wire adapter to get the navigation items (tabs) that the user has access to.

Changed Modules

The following modules have a new wire adapter or JavaScript function.

The getObjectInfos wire adapter is new. Use getObjectInfos to get metadata for multiple objects. The response includes metadata describing fields, child relationships, record type, and theme for each object.
import { LightningElement, wire } from 'lwc';
import { getObjectInfos } from 'lightning/uiObjectInfoApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';
import OPPORTUNITY_OBJECT from '@salesforce/schema/Opportunity';

export default class GetObjectInfosExample extends LightningElement {
    @wire(getObjectInfos, { objectApiNames: [ ACCOUNT_OBJECT, OPPORTUNITY_OBJECT ] })
The getRecordNotifyChange() function is new. Call getRecordNotifyChange() to refresh the Lightning Data Service cache after you update a record outside of its mechanisms, such as via imperative Apex, Visualforce, or when you call User Interface API via a third-party framework. Lightning Data Service fetches record updates for the record IDs you specify and refreshes your Lightning Data Service cache, providing your wires with the latest record data.
import { LightningElement, wire } from 'lwc';
import { getRecord, getRecordNotifyChange } from 'lightning/uiRecordApi';
import apexUpdateRecord from '@salesforce/apex/Controller.apexUpdateRecord';
export default class NotifyRecordChangeExample extends LightningElement {
    @api recordId;
    // Wire a record.
    @wire(getRecord, { recordId: '$recordId', fields: ... })
    async handler() {
      // Update the record via Apex.
      await apexUpdateRecord(this.recordId);
      // Notify LDS that you've changed the record outside its mechanisms.
      getRecordNotifyChange([{recordId: this.recordId}]);