This package includes scripts and configuration used by Create React App. It is a fork of the official react-scripts package aimed at bringing the convenience of "create-react-app" to desktop app development with electron.
create-react-app <my_app> --scripts-version react-electron-scripts
NOTE: This package uses a globally installed electron version (Using the electron binary from a locally installed was causing problems for some reason). If you have not yet installed electron, you will be prompted.
NOTE: running npm/yarn start will run the webpack dev server and start the electron app. Changes to the code run by the renderer process will cause a hot reload. To restart the main process, close the spawned application (you will be prompted to restart). To run the main process indepentent of the webpack dev server, run:
electron .
- Getting Started – How to create a new app.
- src/
- Contains React app skeleton including a react component implementing the close, minimize and fullscreen buttons in a MacOS style (replacing the native buttons).
- main_process/
- main.js
- Main electron process.
- main.js
- index.js
- Kicks off main process.
- Create scripts for building and bundling electron app.