Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Preact is brilliant. I use it instead of React for basically anything that I'm allowed to, for one single reason: it's Component class's "render()" method takes props and state as arguments! Testing becomes nicer, especially when porting an existing React component over, and I find it conceptually much cleaner.

Getting up and running with Preact, TypeScript (or Bublé[0]) and Rollup is pretty simple, and gives an extremely small and very fast bundle, which I just adore.

The big thing, is that by choosing the right tools, I can keep my `ls node_moduels | wc -l` small, and Rollup's tree-shaking takes that even further. With some forethought, one can achieve this with React, too, but I find Preact beautiful to use, and Hyperscript instead of JSX can be a boon for rapidly prototyping an idea for a component instead of setting up yet-another-js-build-system!

[0] https://buble.surge.sh/guide/

Edited to add: I've also used it successfully for some (unfortunately internal, I'd love to show you them) big production systems, where we had a team of 7 developers working on it at the end. Still in use now, and it was a breeze -- and runs extremely fast, UI-wise.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: