Softwr

Web Development · head to head

Preact vs SolidJS

Preact logo

Preact

Web Development

3kB alternative to React with the same modern API

From
Free
Rated
-
SolidJS logo

SolidJS

Web Development

Reactive JavaScript framework with no virtual DOM

From
Free
Rated
-

The short version

  • Each has a real cost: Preact compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose; SolidJS much smaller ecosystem than React, so many problems have no off-the-shelf library
  • They diverge on capability: Preact covers 3kB runtime, SolidJS covers No virtual DOM.

Where they differ

Only the attributes on which Preact and SolidJS actually diverge.

Attributes where Preact and SolidJS differ
AttributePreactSolidJS

Identical on both: starting price (Free), pricing model (Open source, no licence fee), free tier (Yes), platforms (Web), user rating (Not yet rated), category (Web Development).

What each one covers

Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Preact

  • 3kB runtime
  • preact/compat
  • Same modern API
  • Fast rendering

Only in SolidJS

  • No virtual DOM
  • Components run once
  • JSX syntax
  • Small bundles

What people use each for

The jobs each tool is most often brought in to do.

Preact

  • Embedded widgets that load inside someone else’s page and must stay smallnot SolidJS
  • Marketing and content sites where JavaScript payload affects Core Web Vitalsnot SolidJS
  • Applications targeting low-bandwidth or low-powered devicesnot SolidJS

SolidJS

  • Interfaces where update performance is the binding constraintnot Preact
  • Teams comfortable with React syntax who want finer-grained reactivitynot Preact
  • Applications where bundle size directly affects the businessnot Preact

Where each one falls short

Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Preact

  • Compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose
  • Behavioural differences from React exist in edge cases, particularly around event handling
  • A much smaller community, so unusual problems have fewer existing answers than React

SolidJS

  • Much smaller ecosystem than React, so many problems have no off-the-shelf library
  • The React-like syntax is misleading: components run once, and React habits produce subtle bugs
  • Smaller hiring pool and fewer learning resources than the mainstream frameworks

Pricing, plan by plan

Preact

Free
  • PreactFree
    • Full library
    • Commercial use permitted
    • No usage limits

SolidJS

Free
  • SolidJSFree
    • Full library
    • Commercial use permitted
    • No usage limits

Which should you pick?

Choose Preact if

  • You need 3kb runtime.
  • You want to start without paying.
  • You also want preact/compat.

Choose SolidJS if

  • You need no virtual dom.
  • You want to start without paying.
  • You also want components run once.

Questions people ask

Is Preact or SolidJS better?
Neither clearly leads. Preact starts at Free and SolidJS at Free, and user ratings are close enough to be indistinguishable. Choose on capability and platform support.
Which is cheaper, Preact or SolidJS?
Preact starts at Free and SolidJS at Free.
Does Preact or SolidJS run on more platforms?
Both run on Web, so platform support will not decide this one for you.
Can I use Preact for free?
Both have a free tier, so you can try either at no cost before committing.
What is Preact best used for?
Preact is most often used for embedded widgets that load inside someone else’s page and must stay small, marketing and content sites where javascript payload affects core web vitals, applications targeting low-bandwidth or low-powered devices. Of those, embedded widgets that load inside someone else’s page and must stay small and marketing and content sites where javascript payload affects core web vitals are not what SolidJS is typically brought in for.
What can Preact do that SolidJS cannot?
Preact covers 3kB runtime, preact/compat, Same modern API, Fast rendering. SolidJS covers No virtual DOM, Components run once, JSX syntax, Small bundles.

Answered from the vendors’ own pages

Preact: Is Preact free?

Yes, open source under the MIT licence.

SolidJS: Is SolidJS free?

Yes, open source under the MIT licence.

Preact: Can I use React libraries with Preact?

Most, through the preact/compat layer. Compatibility is good but not complete, so libraries relying on React internals can break.

SolidJS: Is SolidJS just React without the virtual DOM?

The syntax is similar but the model is not. Solid components run once and reactivity is fine-grained, so patterns that are correct in React can be wrong in Solid.

Preact: Why choose Preact over React?

Bundle size, almost always. If payload is not a binding constraint, React’s ecosystem is usually the better trade.

SolidJS: Why is SolidJS fast?

It compiles away much of the framework and updates individual DOM nodes directly, rather than re-rendering components and diffing a virtual DOM.

Share

Related pages

Other head to heads