After doing this setup, building the app is essentially trivial. Just do the following, and all the distributable files will be found in the dist/ directory:
npm run electron-builder
Now that we have the Linux app, we can run it by unzipping the .zip file and clicking on the chapter13 executable. (The name came from the "name" attribute in package.json, which we modified earlier.) The result should be like what's shown in the following screenshot:
I also wanted to try out the Windows EXE file. Since I didn't have a Windows machine, I made do by downloading a free VirtualBox virtual machine from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/—they only work for 90 days, but I needed it for just a few minutes.
After downloading the virtual machine, setting it up in VirtualBox, and finally running it, the result that was produced was the same as for Linux, as shown in the following screenshot:
So, we've managed to develop a React app, enhanced it with the Node and Electron features, and finally packaged it for different operating systems. With that, we are done!