mrkeyoor.com_
Tue 01 Sept 17:40 UTC
Webevaluationupdated 25 Aug 2026

preact review

Preact is a small component library for building browser interfaces with a React-like API. It gives teams JSX, hooks, server rendering, and a virtual DOM while keeping the core download small, and its compatibility layer can run much of the React ecosystem.

+15stars / 7d
Verdict

Our Preact run built in 7 seconds and passed 1,301 of 1,312 tests with 11 skipped, so the small runtime is backed by a healthy source project rather than a thin compatibility shim. Use Preact when JavaScript weight matters and your React-shaped dependencies pass real browser tests. Stay with React when exact behavior across a large React component stack is a release requirement.

We ran it

Lab card: what happened when we ran preactScreenshot of preact (preactjs.com)
Install✓ · 44s318 packages · 184 MB
Build✓ · 7s
Tests✓ · 30s1301 passed · 0 failed · 11 skipped of 1312 (vitest)
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo384 files~58,454 lines of source · 2.1 MB · 8 CI workflows · tests dir

Answers from our run

Does preact build from source?

Dependencies installed in 44 seconds (318 packages), and the build succeeded in 7 seconds. We cloned commit 8b25c58 into a clean Debian container with 3 CPUs and no project-specific setup.

Do preact's tests pass?

Yes: 1301 of 1312 passed when we ran the project's own test command (vitest). Some failures need services or credentials a bare container does not have.

Does preact have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use preact?

Teams that require every React package to behave identically: Preact's guide says it is not a React reimplementation, and issue 5177 documents different behavior in MUI X date pickers.

What are the alternatives to preact?

React, Solid, Vue. Our Preact run built in 7 seconds and passed 1,301 of 1,312 tests with 11 skipped, so the small runtime is backed by a healthy source project rather than a thin compatibility shim.

Setup5/5Fast install and build, with a clean test run in our container
Docs5/5Clear guides explain core use and React differences directly
Community5/5Current commits, releases, and focused issue traffic
Maturity5/5Long-running library with passing tests and stable release support

Discussed on

  1. hnPreact Signals159 points
  2. hnPreact: Fast 3kb React Alternative with the Same API, Components and Virtual DOM117 points
  3. hnPreact, React alternative without weird Patents License67 points
  4. hnEtsy Moves from React to Preact64 points
  5. hnShow HN: React-hint – 150LoC Tooltip Component for React, Preact and Inferno37 points

Who it’s for

Frontend teams that care about shipped JavaScript size and still want component and hook patterns.
React developers building embedded widgets, marketing pages, or performance-sensitive web apps.
Teams willing to test third-party React packages through preact/compat.
Developers who prefer browser-standard events and direct ES module support.

Who it’s NOT for

Teams that require every React package to behave identically: Preact's guide says it is not a React reimplementation, and issue 5177 documents different behavior in MUI X date pickers.
Apps that need a React feature as soon as React ships it: compatibility is discussed and added selectively, with React 18 and 19 support still uneven in the guide.
Developers who want a full application framework with routing, data loading, and deployment policy included: Preact is the view library, so those choices remain yours.
Projects that cannot absorb a major-version transition: the main branch README points to an upcoming release while v10 patches live on a separate branch.

Setup reality

Our npm install succeeded in 44 seconds, adding 318 packages and using 184 MB on disk. The build finished in 7 seconds, then Vitest completed in 30 seconds with 1,301 passed, 0 failed, and 11 skipped out of 1,312. The audit found 0 known vulnerabilities.

A consumer app only needs the package and its normal bundler or a browser ES module path. React-library reuse usually adds a preact/compat alias, and server rendering, routing, signals, or testing each bring their own package and configuration choices.

Contributors should notice that the main branch targets the next release while v10 fixes use v10.x. Our run used Node 22 in a 384-file checkout, not an existing production application's bundler and dependency graph.

Preact trades exact React behavior for a smaller runtime

Preact provides components, hooks, JSX, a virtual DOM, server rendering support, and browser developer tools in a library whose README describes the core as 4 kB. Its API will feel familiar to React developers, and preact/compat maps many React imports onto Preact. That makes migration possible without rewriting every component on day one.

The size claim is only one part of the decision. A smaller view library can reduce initial JavaScript, especially in an embedded widget or a page where the application code is modest. It matters less when a large editor, charting package, or design system dominates the bundle. Measure the final route rather than subtracting two package sizes on paper.

Browser-standard behavior explains the compatibility gaps

Preact's guide is candid that the project is not a React reimplementation. Core Preact uses native browser events instead of React's synthetic event system. Without the compatibility layer, form inputs normally use onInput, double-click handlers use onDblClick, and events do not bubble through portals in the same way. Custom elements and case-sensitive custom events follow the DOM more closely.

preact/compat removes many differences by aliasing React-facing imports and normalizing behavior. It is a practical bridge for shared component code, but the guide does not promise that every React package will work. Compatibility is measured against the current and previous React majors, and features are considered based on whether they fit Preact's size and design goals.

A React dependency can still expose different scheduling

Issue 5177 gives a useful example. A user reported three behavior differences in MUI X date pickers, including a minutes field that cleared the entire time under Preact. Their analysis points to render and effect timing in a component that uses timeouts and direct DOM changes. The report remained open after an August 6 update.

That does not make MUI X unusable, and the reporter describes fragile implementation details in the component itself. It does show why an alias is not enough evidence for a migration. Exercise date pickers, editors, portals, focus handling, suspense boundaries, and any library that relies on exact effect timing. A unit suite built around your own components may never touch the incompatibility.

What happened when we ran it

Our sandbox cloned commit 8b25c58 into an unprivileged Debian container with 3 CPUs, 8 GB of RAM, no secrets, and Node 22. The checkout contained 384 files, about 58,454 lines of source, and occupied 2.1 MB. It had 8 CI workflow files and a tests directory, with no Dockerfile at the root.

The npm install completed in 44 seconds, adding 318 packages and using 184 MB on disk. The build succeeded in 7 seconds. Vitest finished in 30 seconds with 1,301 passes, 0 failures, and 11 skips among 1,312 tests. npm audit reported 0 known vulnerabilities across all four severity levels.

This was a clean source verification, and it is unusually reassuring for a framework branch moving toward a major release. It does not measure browser download size, rendering speed, hydration time, or compatibility with an application's package set. Those questions require a built app and its real browsers. The run does establish that the documented repository could install, compile, and finish its own suite on our fresh box.

The main branch and stable v10 need separate decisions

The README warns that the main branch is for the upcoming release and directs v10 patches to v10.x. Our measured commit landed on August 25 and added HTML attribute types. The latest stable release was 10.29.8, published August 1, with two performance changes involving flushSync batching and retained subtree traversal.

A team adopting Preact today should choose whether it is evaluating stable v10 or the 11 release candidate, then keep documentation and dependencies aligned with that choice. The repository's 40 open issues and pull requests combined form a small queue, while the August 25 push and active 11.0 release pull request show that development is current. A small queue alone does not prove absence of bugs, but the issue and release activity look well tended.

Preact works best where you control the component surface

The best cases are sites, widgets, and product interfaces where the team owns most components and can verify the few React packages it reuses. Preact supports direct ES module loading, so it also suits small no-build experiments. For larger apps, add routing, data fetching, and application structure deliberately; the core library does not prescribe them.

Choose React for a product whose risk sits in a broad React-only component stack. Choose Solid when fine-grained reactivity matters more than React compatibility, or Vue when its template and official tooling suit the team. Preact earns the choice when its 4 kB target changes a measured page and your compatibility tests stay green.

Alternatives

ProjectWhat it isPick it when
React gh↗The larger library whose component model and ecosystem Preact closely follows.pick this instead when exact ecosystem compatibility and first-party access to new React APIs matter more than bundle size.
SolidA component library using fine-grained reactivity without a virtual DOM runtime.pick this instead when you want reactive updates by design and do not need React package compatibility.
Vue gh↗A component framework with its own template model and official application ecosystem.pick this instead when you prefer Vue's templates and integrated tooling over React-shaped APIs.

What people are saying

  1. [velocity-scout] preactjs/preact

Sources

  1. Preact README
  2. Preact differences from React guide
  3. Preact 10.29.8 release
  4. MUI X date picker compatibility report
  5. Measured Preact commit

More web reviews

axios · super-productivity · Graphite · fastify · tabler · go-zero · the whole board →