A reusable component that renders dynamic component element UI
- Set up your environment. Follow the steps in the Quick Start: Lightning Web Components Trailhead project. The steps include:
- Enable Dev Hub in your Trailhead Playground
- Install Salesforce CLI
- Install Visual Studio Code
- Install the Visual Studio Code Salesforce extensions, including the Lightning Web Components extension
- If you haven't already done so, authenticate with your hub org and provide it with an alias (myhuborg in the command below):
sfdx force:auth:web:login -d -a myhuborg
- Clone the lwc-dynamic-element repository:
git clone https://github.com/stomita/lwc-dynamic-element
cd lwc-dynamic-element
- Create a scratch org and provide it with an alias
sfdx force:org:create -s -f config/project-scratch-def.json -a lwc-dynamic-element
- Push the app to your scratch org:
sfdx force:source:push
- Open the scratch org:
sfdx force:org:open
-
Go to Home tab, and select "Edit Page" from menu to lauch Lightning App Builder.
-
Put "dynamicElementTestApp" component onto the area in the page, and save.