Electron powers VS Code, Slack, Discord, and thousands of desktop apps. Build cross-platform applications with the web technologies you already know.
Why Electron
Native development: learn Swift for Mac, C# for Windows, GTK for Linux. Three codebases.
Electron: one JavaScript codebase. Works on Windows, macOS, and Linux.
What You Get for Free
Chromium + Node.js:
- Chromium renders your UI (any web framework works)
- Node.js gives you file system, networking, OS integration
- IPC bridge connects the two
Cross-platform: one codebase compiles to .exe, .dmg, and .deb
Auto-updater: built-in update mechanism
Native menus: OS-native menu bars and context menus
System tray: tray icons with custom menus
Notifications: OS native notifications
Crash reporting: built-in crash reporter
Quick Start
mkdir my-app && cd my-app
npm init -y
npm i electron --save-dev
// main.js
const { app, BrowserWindow } = require('electron');
app.whenReady().then(() => {
const win = new BrowserWindow({
width: 1200,
height: 800,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
},
});
win.loadFile('index.html');
});
With React/Vue/Svelte
Use Electron Forge or electron-vite:
npm create @quick-start/electron my-app
This scaffolds a project with Vite + your framework of choice, HMR for development, and production builds.
Apps Built with Electron
- VS Code (Microsoft)
- Slack
- Discord
- Figma (desktop)
- Notion (desktop)
- Obsidian
- Postman
The Tradeoff
Electron apps are larger (60MB+) and use more RAM (200MB+) than native apps. If this matters, consider Tauri (uses OS webview instead of Chromium).
But: Electron has the largest ecosystem, best documentation, and most battle-tested production apps.
If you need a desktop app and your team knows JavaScript — Electron is the fastest path to production.
Need web scraping or data extraction? Check out my tools on Apify — get structured data from any website in minutes.
Custom solution? Email spinov001@gmail.com — quote in 2 hours.
Top comments (0)