Slack

How Slack rebuilt its desktop app without a big-bang rewrite

Slack modernized a 2012 jQuery codebase into React and Redux by growing a new app inside the old one, shipping piece by piece, a textbook strangler-fig migration.

Based on When a rewrite isn't: rebuilding Slack on the desktop by Mark Christian and Johnny Rogers (Slack, 22 July 2019).

8 min read · Bloom is not affiliated with Slack. Read the original for the full story.

TL;DR

  • Slack's original desktop client (2012) used jQuery and manual DOM updates, loaded everything up front, and ran one Electron process per workspace.
  • Instead of a big-bang rewrite, they built a "modern" codebase inside the existing app and replaced it piece by piece: the Ship of Theseus approach.
  • Three rules defined modern code: React for UI, lazy-loaded data, and awareness of multiple workspaces.
  • One Redux store per workspace let a single process serve every workspace, and new parts shipped to users for years before the migration finished.

The problem

Slack's desktop app was born in late 2012, built with jQuery and direct DOM manipulation. By 2019, three design choices had become serious limits:

  1. Manual DOM updates. When data changed, templates had to be re-rendered by hand, so the UI and the data model could drift out of sync.
  2. Eager data loading. The client downloaded everything relevant to a session at startup. That was fine for small teams, and very expensive for large workspaces.
  3. One process per workspace. Each signed-in workspace ran as its own Electron process, so people in several workspaces paid for several full copies of the app in memory.

The obvious response is "let's rewrite it." The article's title tells you they didn't, at least not in the usual way.

A rewrite that isn't: the Ship of Theseus

Big-bang rewrites are risky: the old app keeps changing while you rebuild, hidden behavior gets lost, and users see nothing until a risky cutover. Slack chose an incremental path, which the authors compare to the Ship of Theseus: replace the ship plank by plank while it keeps sailing.

In practice:

  • A new "modern" directory was created inside the existing codebase.
  • Code in it had to follow three rules: UI in React, data loaded lazily, and multi-workspace aware from the start.
  • A deliberate "legacy-interop" layer controlled the boundary: modern code couldn't freely reach into legacy code, and legacy code used modern pieces through explicit exports and adapters.

That boundary is what keeps an incremental migration from turning into a permanent hybrid mess: every crossing between old and new is visible and intentional.

The new architecture

The center of the modern client is Redux, which the authors describe as a convenient abstraction around the concept of an individual workspace. Each workspace gets its own Redux store, holding its data, its connection status, and its WebSocket connection.

Because a workspace is now a store, not a process, one Electron process can serve every workspace. Together with the other two rules:

  • React replaced manual DOM updates: the UI is derived from state, so it can't drift from it.
  • Lazy loading replaced the "download everything" data model: data is fetched when a view needs it.
  • One process replaced one process per workspace, which the article credits with significant memory savings.

How they shipped it

The modern codebase reached users long before the migration was "done." The emoji picker was the first modern component in production, more than two years before the full rollout, followed by the channel sidebar, the message pane, and more.

This is the real advantage of the approach: each piece delivered value and production feedback as soon as it was ready, instead of everything waiting for a single high-risk launch.

  Before                                   After (incrementally)
  ──────                                   ──────────────────────────────────────────
  Electron process: workspace A            ONE Electron process
  Electron process: workspace B              ├─ Redux store: workspace A (data, socket, status)
  Electron process: workspace C              ├─ Redux store: workspace B
   (jQuery, eager loading)                   └─ Redux store: workspace C
                                           UI: React components from /modern
  legacy code ◀── legacy-interop (explicit exports/adapters) ──▶ modern code
  shipped piece by piece: emoji picker → channel sidebar → message pane → ...
Incremental migration inside one app (simplified)

Key decisions and trade-offs

DecisionWhyTrade-off
Incremental replacement instead of a big-bang rewriteKeeps the product working and shipping, and delivers value continuously.Old and new code coexist for years, which needs discipline and an explicit boundary.
Explicit legacy-interop boundaryEvery dependency between old and new code is visible and controlled.Adapters and exports are extra code to write and maintain during the migration.
One Redux store per workspaceTurns a workspace into state rather than a process, so one process can serve all workspaces.Every feature must be written workspace-aware from day one.

What this means for your frontend

  • Prefer incremental migration with a strict boundary over a rewrite. Define the rules for new code up front (Slack's three rules) so the new world doesn't inherit old problems.
  • Make the boundary between legacy and modern code explicit, such as an interop module or adapters, plus lint rules against deep imports.
  • Ship the first migrated piece early, ideally something small and self-contained like Slack's emoji picker, to prove the path in production.
  • Look for the expensive unit in your architecture (here, a process per workspace) and ask whether it can become state instead.

Check your understanding

What let Slack serve multiple workspaces from a single Electron process?

Why did Slack introduce a 'legacy-interop' layer?

Go deeper on Bloom

Explainer written 22 October 2026.