How it works
An Electron app has two sides. The main process runs Node.js, so it can open files, create windows, show notifications and call native code. Each window is a renderer process, a Chromium page that draws the interface with HTML, CSS and JavaScript. The two talk over IPC (inter-process communication), ideally through a small preload script that exposes only the functions the page needs.
Because every app bundles the same browser engine, it looks and behaves the same on all three systems, and any web framework works for the interface. VS Code, Slack, Discord, Figma's desktop app and Obsidian are built this way. The cost is weight: even a small app ships a full browser, so downloads run to tens of megabytes and each window uses about as much memory as a browser tab.
A new major version arrives every eight weeks to keep pace with Chromium, and only the three newest get fixes, so apps need regular upgrades. Electron Forge and electron-builder handle packaging, installers and auto-updates.
Electron pros and cons
Pros
- Same engine everywhere, so the app looks and behaves the same on every system
- Any web framework and the whole npm ecosystem work
- Full Node.js access to files, processes and native modules
- Mature, with many large apps and years of tooling behind it
Cons
- Large downloads and high memory use, because each app ships Chromium
- Frequent major releases to keep up with for security fixes
- Careless IPC or Node access in a window can turn a web bug into a system-level hole
When to use Electron
Pick it when
- A web team wants a desktop app without learning a new language
- The app must render identically on Windows, macOS and Linux
- You rely on Node.js libraries or native Node modules
Skip it when
- Download size and memory use matter a lot (look at Tauri)
- A small utility, where a native or Tauri build would be a fraction of the size
Electron pricing
Electron vs the alternatives
Related terms
More in Desktop apps
Frameworks