Showing a loading indicator while calling Apex in Salesforce LWC
问题 What is the best way to show a loading indicator while retrieving data from Apex in a Lightning Web Component? I have this approach: import { LightningElement, api } from "lwc"; import shouldShowCard from "@salesforce/apex/ApexClass.shouldShowCard"; /** * Card component that is conditionally shown based on Apex. */ export default class ConditionalCard extends LightningElement { @api recordId; @api isDone = false; @api shouldShow = false; connectedCallback() { shouldShowCard({ id: this