Boilerplate repository for developing Lightning Components With React.
This provides the basic structure needed for adding React Components to your Salesforce Org via Webpack and SFDX.
- Fork this repo.
clone
your forked repo withgit clone <yourRepoUrl>
- Install sfdx cli
- Install Node
cd
into the project directory and runyarn
ornpm install
- Go through Setup
- Run
npm run deploy
- Open your scratch org.
- Go to your developer console.
- Open Lightning Resource > ReactDevContainerApp
- Click Preview and you should see something like this:
prefix with yarn
or npm run
.
example: yarn build
build
- runs webpack to bundle your React src.deploy
- runsbuild
and then pushes to your default scratch org
This project was influenced by this post: Lightning Container Component: Building Components with React, Angular, and Other Libraries.
This project is developed and maintained by @EigenX. Have questions or need help with setup? Email Us
See LICENSE