Key Electron JS techniques
Some key methods to building good Electron Applications
Solomon Khoury
Here are some key tools to master for building Electron JS powered cross platform desktop applications.
1. Use Electron Forge
While I have tried other boilerplates, which often have benefits such as Vite or greater simplicity, Electron Forge is simply far less likely to give you obtuse errors (this may have happened to me and wasted a lot of my time). It also uses Webpack, which is a rather verbose but functionally effective bundler.
2. Master IPC
Inter-process communication is the heart of how Electron components (preload, renderer and main) interact. Electron components are intentionally distanced for security measures and often applications and boilerplates attempt to circumnavigate them for simplicity. This is a hazard and needs to be avoided through properly understanding the methods. IPC is a bit annoying but can be managed with sharing preload and main item naming and taking good notes of this page.
3. make the create-window process return its respective object
Make each browser window a class object and you will be able to have multi-window applications, with easier IPC through being able to send from main at any point.