Svelte 3. Rich Harris. Rethinking Reactivity. What if we did more of the reactive work at compile time? blog
site
youtube ![]()
YOUTUBE AdNJ3fydeao Rich Harris. Rethinking Reactivity. Code Camp 2019.
He begins his talk with admiration for the first spreadsheet, as a first example of reactive programming.
1m17s
The way that this works is the spreadsheet maintains a dependency graph internally.
3m07s
In other words reactive programming is all about data flow; it's all about tracking values through your application. When the value changes your application should react.
5m54s
React's own API reveals that virtual DOM is not fast enough, because the core team have given us ways to tell the computer it doesn't need to worry about these parts of the DOM.
6m59s
Frameworks are not tools for organizing your code. They are tools for organizing your mind. Given that, maybe the framework should be a thing that runs in your build step instead..."compilers are the new frameworks." And so I started a project called svelte.
9m15s
Svelte 3 three moves reactivity out of the component API and into the language.
<script> let name = 'world'; let count = 0; </script> <h1>Hello {name}</h1> <input bind:value={name}> <button on:click={() => count += 1}> Clicks: {count} </button>
.
In the intro, Rich Harris admires how React changed the world for web apps. See also Two Insights in React
Rich also admires Observable. He notes that the trick of computing values in topological order is exactly the trick from the first spreadsheet.
Observable Notebooks inspire us with their spreadsheet-like dynamic updating.