Salesforce Lightning Inspector 

Salesforce Lightning Inspector provides the excellent ability to inspect the Component Tree, component DOM markup, and events, as well as display actions, override actions, and profile performance. This tool can be great for inspecting issues, especially related to events firing and data coming from the Apex method.

You can add the Salesforce Lightning Inspector from the Chrome web store. Here is the link to add the inspector to the Chrome browser: https://chrome.google.com/webstore/detail/Salesforce-Lightning-insp/pcpmcffcomlcjgpcheokdfcjipanjdpc?hl=en

Once you add the Lightning inspector to Chrome, if a Salesforce page has Lightning Components, you will see a Lightning subtab in the developer Console of Chrome, as shown in the following screenshot:

For this chapter, we will use the code from Chapter 3, Lightning Component Building Blocks. You can access the code from the Git repository here: https://github.com/PacktPublishing/Learning-Salesforce-Lightning-Application-Development/tree/master/chapter3.

Recall the YouTube search application searches videos from YouTube using search terms entered by users. Check out the following screenshot to recall how the application looks:

To create a scratch Org with all the components from the Chapter 3, Lightning Component Building Blocks repository, execute the following commands in your command line:

This assumes you have the Salesforce DX CLI installed. To find instructions to download it, refer to the Installing Salesforce DX CLI section in Chapter 2Exploring Salesforce DX. Also, you will need Salesforce Org with Developer Hub enabled. Refer to the Enabling Developer Hub in your Salesforce Organization section in Chapter 2Exploring Salesforce DX to get instructions to start a Salesforce Trial Organization that has the option to enable DevHub.
  1. Log in to DevHub using the CLI command:
sfdx force:auth:web:login -d -a DevHub
  1. Set your DevHub as the default hub using this command:
sfdx force:config:set defaultdevhubusername=DevHub
  1. cd into the chapter3 folder and create a scratch Org using this command:
sfdx force:org:create -s -f config/project-scratch-def.json -a testorg
  1. Set your scratch Org as the default Org using this command: 
sfdx force:config:set -u=testorg
  1. Push the source code to the scratch Org using this command: 
sfdx force:source:push
  1. Optionally, you can open the Org directly from the CLI using this:
sfdx force:org:open
In the YouTube search Apex class, you will need the API key for the component to work. Refer to the Wiring the client-side to the server using Apex controllers section in Chapter 3Lightning Component Building Blocks for instructions on how to obtain the key.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.38