The Racing Overview Lightning standalone app is contained in the sample code for this chapter. It can be accessed through /c/RacingOverviewLWC for LWC, or via the Lightning Experience container through the Race Overview tab, as shown in the following screenshot.
The following screenshot shows what the app looks like and gives a first look at the Lightning components we will be covering in more detail throughout the rest of this chapter:
The sample record data shown in the preceding screenshot can be injected into your scratch org by running the sfdx force:apex:execute command (without any arguments) from the command line. When prompted, paste the following script and press Ctrl + D to execute it:
PageReference sampleData =
new PageReference('/resource/sampledata');
String sampleDataJSON =
sampleData.getContent().toString();
String orgNameSpace =
SObjectDataLoader.class.toString().
removeEnd('SObjectDataLoader').removeEnd('.'); SObjectDataLoader.deserialize(
sampleDataJSON.replace('ns__',
orgNameSpace.length()==0 ? '' : orgNameSpace+'__'));
Developing components with the Lightning component framework allows you to provide the same UI not only to users using desktop devices, but also mobile devices. In the next section, we will see how Salesforce Mobile can be used to render your components on a mobile device.