Create an app with Electron and React

How to create an Electron Node.js desktop application using create-react-app 2021 UPDATE: I highly recommend using electron-react-boilerplate instead of the approach described in this post Table of Contents Install Node.js if you haven’t already Move to your development folder Create react app Add electron Install foreman to allow executing the app from command line Install the create-react-app dependencies Configure eslint Enough with the setup! Start up Thanks to When I first used Electron in 2015 it was not yet clear that it would be so pervasive in modern apps, and I was kind of shocked by the resulting app size....

How to Set Up Hot Reload on Electron

When developing an Electron app, it’s incredibly useful to enable hot reload functionality, which allows the application to update without requiring a restart. To achieve this, you can leverage the npm module electron-reloader. Let’s assume you have a sample Electron application with the following files: index.js const { app, BrowserWindow } = require('electron') function createWindow() { const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }) win....