Spreadsheets make relationships between values visible
Source 00:06In this 2019 talk, Rich Harris argues that web frameworks can learn from spreadsheets: describe relationships between values, then update what depends on a changed value. His proposed vehicle is Svelte 3, then days from release. The examples and comparisons below describe the technology and his judgments at the time, not a current framework benchmark. Watch from 00:06.
Harris opens with a moon-landing joke before naming his subject. In his account, Remy Landau and Rene Pardo formed LANPAR in 1969; its name stood for Language for Programming Arrays at Random. He highlights forward referencing as a precursor to the data flow he calls reactivity. In a fruit spreadsheet, price and quantity feed formulas for subtotals and a total. Buying another cantaloupe changes the quantity and the dependent cells update. A dependency graph records which cells feed which others; adding a formula changes the graph. Updating only affected values mattered on slow computers.
Harris contrasts this with his account of VisiCalc's cell-by-cell recalculation and Lotus 1-2-3's forward referencing. These are his condensed historical comparisons, used to frame the question: can a web component express dependencies as naturally as a spreadsheet?
Virtual DOM comparison does work without knowing the data flow
Source 02:54Harris borrows a definition of functional reactive programming: specify a value's dynamic behavior when declaring it. In practical terms, track data through an application so that changes produce the appropriate response. He credits React, released in 2013, with influential patterns and frames his criticism as part of a healthy tradition of challenging frameworks.
In his React example, a component holds a name and count, handlers change them, and rendering produces a virtual DOM: an in-memory description of the interface. React compares the previous and next descriptions and reconciles differences with the browser DOM. To change a displayed count from four to five, his walkthrough checks the unchanged div, class, heading, text, input and button before updating the changed text. The component and its closures also run again on state changes. Harris argues that this black-box approach does not track the relationships between values and, by his definition, is not reactive.
For data visualization and animation, he considers the cost too high. He points to shouldComponentUpdate, PureComponent, useMemo and useCallback as ways developers tell React which work can be skipped, and to concurrent mode as a way to spread work over time. These are his assessment of the trade-offs, not proof that virtual DOM is always too slow.
A compiler can turn assignments into targeted updates
Source 06:47Harris proposes treating a framework as a build-time tool for organizing how developers think, rather than necessarily as code executing in the browser. Svelte compiles declarative components into imperative code that manipulates the DOM. Older React and Svelte APIs used setState and set; hooks supplied a setter in the React example. Harris wanted to avoid their verbosity and constraints around this. He credits Vue with using assignment to properties to trigger updates, while noting its runtime approach differs. Watch from 06:32.
In the upcoming Svelte 3 example, let count = 0 and count += 1 update the interface. The compiler instruments assignments to variables used in markup with calls to an invalidate function, marking them changed for an update at the end of the event loop. A binding directive can synchronize an input and a variable without a separate handler; an inline function can replace another handler.
Because the compiler controls the output, the same component can target the browser or server rendering. In the presentation's API, a bundler plugin turns an imported component into a client-side class instantiated with new App; on the server App.render produces HTML. Harris says string-based server rendering is much faster in this comparison and may lower infrastructure costs. These APIs and cost claims are specific to the demonstration and its era.
Reactive declarations follow the dependency graph
Source 11:34Derived state needs another step. A todo list can filter completed items according to todos and hideDone. In Harris's React example, recalculating filtered on every component run can repeat work when neither dependency changed. useMemo caches the result until its dependency array changes, at the cost of specifying those dependencies. Harris says that, in components he converted, React code was typically about 40% larger; this is his observation, not a general measurement.
A plain const filtered in his Svelte example runs only once, so toggling a todo does not update the list. Harris turns to Mike Bostock's Observable notebooks, which execute in topological order: a dependency runs before the value that needs it. He also cites Paul Stovell's imagined “destiny operator,” which would bind b to a + 1, but would not be valid JavaScript syntax.
Svelte 3 instead gives an existing JavaScript labelled statement special meaning in a component: $: b = a + 1. The compiler treats it as a reactive declaration. The todo example uses $: filtered = ... and $: showing = filtered.length; it can also use a reactive statement for debugging. The compiler identifies dependencies, recalculates filtered when todos or hideDone changes, and calculates showing afterwards. This is the spreadsheet-like ordering in generated code. Watch from 13:19.
Evan You called this “SvelteScript”; Harris accepts that Svelte gives syntax special meaning but disputes drawing a hard line between compile-time and runtime magic. For him, the useful behavior matters more than where it is implemented.
Fast benchmarks and responsive interactions answer different questions
Source 17:59Harris shows an old benchmark reporting Svelte 35 times faster than React and 50 times faster than Vue, then agrees with React team member Dan that a benchmark counting hundreds of thousands of updates per second can be meaningless for a 60 Hz display. The user experience matters. The figures describe that old test alone. Watch from 18:03.
Using Dan's JSConf Iceland demo, Harris compares a lagging input, debouncing and React's then-upcoming concurrent or async mode. Debouncing waits until typing stops before updating, leaving the main thread available but delaying feedback. Time slicing breaks work into chunks and yields to the main thread, allowing input feedback while the background graph may lag. In this particular demo Harris prefers the Svelte version and argues that doing less work can be better than scheduling excess work. He acknowledges time slicing improves the React demo over the unsliced version.
He compares the architectural change to electric motors versus incremental improvements to combustion engines, giving his own illustrative efficiency and moving-part figures. He argues that scheduling or moving work does not necessarily reduce the work itself. His broad dismissal of web workers is a rhetorical claim from the talk, not a general rule about whether workers can improve responsiveness.
For another test he adds Svelte 2 to Nick Fitzgerald's Dodrio, a Rust virtual DOM compiled to WebAssembly. He says the original benchmark spent much of its time waiting on setTimeout; replacing scheduling with promise resolution widened Svelte's lead in that test. Harris praises the Rust and WASM work while arguing that eliminating work is the more reliable route to speed. Neither demonstration establishes a universal ranking.
Performance matters on constrained devices
Source 25:03Harris cites Brazilian payments company Stone as a real-world example: it reportedly found React, Vue and other interfaces too slow for its low-powered point-of-sale terminals, then used Svelte. He says 200,000 devices were running it at the time. He also describes Russia's Moslab using Svelte for smart-TV applications and a smart-home control panel. These are speaker-reported 2019 examples, not independently measured results. He expects wearables, IoT, TVs and in-car systems to make efficient web interfaces increasingly relevant. Watch from 24:58.
Compiler knowledge also helps accessibility and styles
Source 26:24A compiler that sees markup can warn about common accessibility problems. In the demo an <img> without alt produces a warning identifying the element; adding alternative text removes it. Compilation still succeeds. The warning prompts a developer to consider people using screen readers or unable to load the image; it does not by itself guarantee an accessible interface.
Svelte's component <style> block scopes a plain p selector to that component, leaving a nested component's paragraph unaffected. Harris explains that generated hashes connect the markup and styles. Since the compiler sees both, it can warn about an unused selector and omit it from the CSS output. He notes CSS-in-JS also addresses the difficulty of knowing which styles are safe to remove. Watch from 26:24.
Transitions make changes easier to follow
Source 29:37Harris demonstrates transition:fly on a conditionally visible element, with parameters and a transition imported from svelte/transition. Rapidly toggling visibility smoothly reverses the transition. He explains that Svelte generates CSS animations from the state change, rather than driving every frame in JavaScript; his performance and battery comparison is a claim about this demonstration, not a guarantee for every CSS animation.
A custom spin function receives a node and optional parameters and returns a css function of t, ranging from zero to one. Svelte turns its CSS output into an animation; the example combines in:spin and out:fade, allowing custom easing. A second todo demo moves items between pending and completed lists, helping readers see that the same item changed position instead of disappearing and reappearing. Watch from 29:37.
A compiler can include only the features an app uses
Source 33:04Framework size matters because users download JavaScript. Harris argues that Svelte's compiler can omit support code for unused features, such as transitions or bindings, making it possible to offer more features without including all of them in every application. That is his design argument; actual bundle size still depends on the application and build.
At the time, Sapper was Svelte's companion application framework, providing server rendering, routing and code splitting, comparable in role to Next or Gatsby around React. Svelte Native was a new community project for iOS and Android based on NativeScript-Vue. Svelte GL was Harris's proposed idea for compiling a declarative 3D scene into drawing calls, not a capability he presented as already shipped. Watch from 33:04.
Approachability is the larger goal
Source 35:21Harris returns to spreadsheets: his wife, who is not a programmer, can nevertheless create valuable work with them. He wants web tools to offer similar accessibility to people with different skills without taking power away from advanced users. He describes a Spotify project where a project manager could directly work with Svelte component code alongside developers. His aspiration is that people from different disciplines can work together on the same code. Watch from 35:21.