General Considerations
Consider these general details when planning your Lightning web components development
efforts.
- The Lightning Web Components framework includes a wide range of built-in components, a number of modules that enable features, and a range of wire adapters for data access. The implementation available in LWC Offline supports a subset of these features. See additional details elsewhere in this guide.
- Use the if:true and if:false directives to ensure your mobile offline components are properly primed when being used.
- You can only use Lightning web components that are used as global or object-specific quick actions.
- Object-specific quick actions can only be added to record detail pages.
- Your components must be Lightning web components.
- You can’t use Aura-based Lightning components, despite the similar name.
- You can’t use Visualforce at all with Lightning web components.
- Headless quick actions aren’t supported at this time.
- Deep links to quick actions are supported. Deep links to global quick actions aren’t supported at this time.
- To work offline, your custom components must be statically analyzable by the Salesforce service so that they can be preloaded before going offline. See Offline Environment Details for details.
- Calling alert() from JavaScript in a Lightning web component is unsupported. It’s also an anti-pattern in Lightning web components. For debugging and logging, use console.log() and console.error(). Better yet, use Chrome DevTools or Safari Web Inspector.
- For user-facing messages, the correct pattern is to use a toast message. However, support for the lightning/platformShowToastEvent module is incomplete. Use LightningAlert instead.
- Lightning web components perform minimal validations while offline. It’s possible for a record to be changed, or a new record created, which passes local validation while offline. However, it’s possible for this record to subsequently fail server-side validation when the draft record is uploaded. Record drafts that fail server-side validation block the offline queue and prevent record changes from uploading. Manually clear the invalid record to unblock the queue.
- Depending on context, it can be unclear which field of a draft record has failed server-side validation.
- Some Lightning web components don’t render properly due to incorrect form factor detection in certain circumstances. See the known issues in Modules Support for details.
- A maximum of 50 records are fetched for each related list. The list size indicator — for example, “(50+)” — reflects the number of records downloaded to the app, not the number of records that exist. This limit will be customizable in a future release.