Code that accompanies the Pluralsight course, Communicate Between Salesforce Lightning Web Components
-
Set up your Salesforce DX environment by installing the Salesforce CLI and Visual Studio Code Salesforce extensions.
-
Authorize your DevHub org and provide an alias such as below:
sfdx auth:web:login -d -a DevHub
- Clone the repository:
git clone https://github.com/saramorgan/lwc-events.git
cd lwc-events
- Create a scratch org and provide it with an alias such as LWCEvents
sfdx force:org:create -s -f config/project-scratch-def.json -a LWCEvents
- Push the app to your scratch org
sfdx force:source:push -u LWCEvents
- Assign the lwcevents permission set to the default user
sfdx force:user:permset:assign -n lwcevents
- Import sample Product2 data
sfdx force:data:tree:import -u LWCEvents --plan data/Product2-plan.json