3 ms·
Cool experiment, but what was learned? We already knew that: 1. Vanilla JS is faster than Preact's diff/render. 2. Preact's diff/render is faster than Reac
by anonytrary 6y ago
Cool experiment, but what was learned? We already knew that:
1. Vanilla JS is faster than Preact's diff/render.
2. Preact's diff/render is faster than React's.
3. Preact's concurrency model is extremely weak/non-existent.
4. Preact has worse third-party library support than React.
5. Preact is not that much smaller (min-gzip) than React 16.
The conclusion is still the same: use React for UI, don't bother with React-family libraries. Use vanilla JS for games, canvas, and other web APIs that aren't UI.
- redis_mlc 6y agoAs a proud vanilla-js developer for over two decades, my primary concern hasn't been speed for the past decade, and today it's a total non-issue - I don't even need to profile vanilla-js code, since execution time is not noticeable. But there is nervousness of supporting/testing browsers like IE/Edge. - I haven't had any issues on Safari/Chrome/Firefox for several years, but you never know with the MS products until you try. I only use a single polyfill for IE/Edge, plus a couple of UA `if' statements, so it hasn't been difficult to write cross-browser code using trailing-edge JS API calls. But there is always a nagging testing load.
- kreetx 6y agoI wonder how Svelte/lit-html and others without vdom would have compared.