Key Differences

B2B Commerce Aura and LWR storefronts share many of the same functionalities, but they support different components with varied behavior. To understand the requisites of store migration, consider these distinctions.

A B2B store uses the Lightning Component framework to construct UIs for mobile and desktop devices. As of Spring ’19, you had the option to build these Lightning components, or deploy preconfigured components, using two programming models: the LWC model and the original Aura Components model.

A B2B store on Aura supports Lightning web components and Aura components. A B2B store on LWR only supports Lightning web components. To ensure a smooth migration from B2B Commerce Aura to B2B on LWR, prepare to update your storefront’s existing UI components.

Many Lightning web components developed to run in Aura function on LWR with no changes or can be easily modified to do so. For more information on store components, see LWR and Aura Store Templates.

Lightning web components and Aura components differ in their styling capabilities and their response to global HTML attributes and events. For example, an Aura component requires you to create your own classes for custom styling. A Lightning web component prevents custom styling with your own classes because it follows shadow DOM standards, which hide the elements inside the component from the page that contains the component. Instead, you can modify a base or custom Lightning web component using --dxp styling hooks, which map to CSS custom properties in your site’s Theme panel. This functionality makes branding a B2B store on LWR faster, easier, and more consistent. For more information, see How Branding Works in LWR Sites.

Lightning web components also inherit global HTML attributes and events, making them more functional and performant than their Aura counterparts.

To access a stream of Salesforce data and metadata, Lightning web components use a wire service built on Lightning Data Service. This wire service creates reactive storefronts using data from individual records, lists of records, and object and layout schema. For details, see Use the Wire Service to Get Data.

Aura components access Lightning Data Service with equivalent but more restrictive form-based components such as lightning and force.