Just another
reactandelectronboilerplate that works withtypescriptandscss.
- Hot reloading support for
electronandreact - Executables can be built via
electron-builder - Support for
scsson renderer - Decoupled
reactandelectron
Runs the project in developer mode with hot reloading for both react and electron.
Runs the project in developer mode but disable hot reloading on main thread when files on electron folder is modified.
Builds electron to the dist folder.
If you are familiar with react and electron, this document is all you need to start using this boilerplate. Also, some relevant comments that have been placed into electron/main.ts and src/index.tsx to explain some pitfalls.
Yes. The src directory is the renderer thread, and the electron directory is the main thread. An example may be seen at electron/main.ts:40 and src/index.tsx:11-12.
Yes. Use this solution.
React Developer Tools extension can be easily added by some packages or manually if the user wishes. It is not hard at all, but this package is designed to be as light and as error-free as possible. There are some issues regarding extensions and electron ^v9.0.0.
Same as above. Some people may need development features on the packaged version, but it is very easy to add if it is required.
- Add
React Developer Toolswhen the issue is solved - Replacing
const electron = window.require("electron");
While these haven't been used directly, this boilerplate is heavily inspired by:
- electron-react-boilerplate
- react-typescript-electron-sample-with-create-react-app-and-electron-builder
- electron-typescript-react
- electron-with-create-react-app
t - typescript
e - electron
r - react
s - scss
h - hot reload
