In Electron 4 applications, there are two main processes: the main process and the renderer process. The main process is responsible for displaying the GUI, managing BrowserWindow instances and registering global shortcuts.
Overview of main concepts in Electron 4 applications.
Every Electron app has one (and just one!) main process. The main process is used to display a GUI and started from the main script defined package.json.
Each web page in Electron runs in a separate renderer process. If not limited, web pages running in a renderer process have to power to access Node.js modules.
Concerns
Takes care of showing your HTML & JS in the Chromium browser
Using inter-process communication a renderer process can exchange messages with a main process:
Note: ipcRenderer does not send messages to itself, it sends them to ipcMain. If you want to access the messages within a renderer process, you need to check ipcMain using electron.remote: