Get the Latest LWC Changes with LWC API Version 68.0

Update the API version for your components to use new features and improvements. Versioning your Lightning web components ensures that your existing components aren’t affected when Salesforce ships new features, bug fixes, and performance improvements that change existing behavior. Versioning also helps Salesforce deprecate legacy features.

Where: This change applies to custom Lightning web components in Lightning Experience, Experience Builder sites, and all versions of the Salesforce mobile app.

How: You can change a component's API version in its .js-meta.xml file.

<?xml version="1.0" encoding="UTF-8"?>
      <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
      <apiVersion>68.0</apiVersion>
      </LightningComponentBundle>
Important
Important We recommend that you upgrade your component API version one version at a time. For example, from 58.0, upgrade from 58.0 to 59.0, fix any errors or warnings you encounter, and then repeat until you get to the latest API version.

When a component’s LWC API version is set to 59.0 or later, it uses that value for its LWC framework version. Components that specify LWC API version 58.0 and earlier continue to work based on LWC framework behavior in Summer ’23 (API 58.0). When you set a component to use an earlier API version, you don’t get new features, bug fixes, and enhancements that are available only with later LWC API versions.

LWC API version 68.0 has no version-specific changes. That makes this release a good one to update your existing components to the current API version.