Easy-to-understand-and-use boilerplate code for creating an Electron desktop app simply using Reactjs and TypeScript. Includes React Router
- Clone this repository.
git clone https://github.com/david-fernando/react-electron-ts.git
- If you havent already, install Yarn globally.
npm install -g yarn
- Navigate into project root and install dependencies.
cd <your-project-name> && npm install
- Run dev server.
npm run start
- Run the build process
npm run build
- Go into your project folder using your file explorer. Navigate to the
dist
folder and open it. Then double-click<your-project-name>
Setup 0.1.0. Your app should open and there should now be an icon on your desktop for this app.
Use a Custom Icon
Add a 256 x 256 .png or .ico image in your public folder. It should be either icon.ico
or icon.png
. Update the icon
property in your package.json
if necessary. Currently, it uses an image called icon.png
, which is a graphic of a coffee cup. You'll only see this in production. For more info, see the electron-builder documentation