When comparing Deku vs Preact, the Slant community recommends Deku for most people. In the question“What are the best JavaScript libraries for building a UI?” Deku is ranked 9th while Preact is ranked 16th. The most important reason people chose Deku is:
Functional approach.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Functional
Functional approach.
Pro Server side rendering
Deku can render it's components and data server side, then it sends those components as HTML to the browser.
This ensures faster initial loading time and SEO friendliness out of the box, since it's indexed as any other static website by search engines.
Pro Easy to learn
Since Deku is very lightweight and has a rather small API, there's not much to learn. It's pretty easy to get started and build something with it.
Pro Can use JSX
Developers using Deku can choose to also use JSX if they want to. This is especially helpful for people who are moving from React to Deku.
Pro Good performance
Deku's diffing algorithm is considerably faster and performs better than most libraries. The dbmonster performance mini-app written in Deku renders roughly 16% faster than other libraries.
Pro Lightweight
The size when gzipped is only 3kb, and performance is as good as (or even faster than) React itself.
Pro Same API as react
Avoids having to learn an entire new paradigm, and makes it easy to switch between the two libraries later on.
Pro Lots of examples and libraries
They have a bunch of examples and addon libraries.
Pro Awesome CLI
Preact CLI gives you a perfect scoring PWA out-of-the-box with no configuration.
Cons
Con No support for legacy browsers
Deku does not support legacy browsers, or relatively old browsers for that matter. They only support the latest versions of the major web browsers.
Con Not a lot of learning resources
Since it's a rather new library and has a small community, there are not many examples where you can learn from out there. There are also few guides and the documentation is not amazing and has some parts that should be covered better.
Con Difficult to learn
You need to be good in React JS first to learn Preact. Documentation is not rich. And some of the examples given on site are not working. Developers are not much active on Stack Overflow as well.