Skip to main content

One post tagged with "architecture"

View All Tags

One React, Four Outputs: DOM, PDF, Email, and Ink

· 15 min read
Gergely Sipos
Frontend Architect

An order has two units at $25 each. The browser editor shows $50. So do its downloadable invoice, confirmation email, and the terminal tool used by operations. Then someone changes the quantity to three. Every new representation should say $75—but updating a screen, producing a PDF, and sending another email are very different jobs.

React can participate in all four. That sounds like “write once, render anywhere,” until you ask what actually receives the component tree. A browser node? A document record? A string of HTML? A terminal frame?

The interesting part is not that several libraries accept JSX. It is where React's responsibilities stop and each destination's begin. We'll follow this hypothetical order across four outputs, separating shared business meaning from layout, input, and delivery. These are four output contracts, not four equivalent renderer implementations: email takes a different architectural branch.