preact

Fast, 3kB React-compatible Virtual DOM library with the same modern component API.

Framework
npm
v10.29.8
38,892 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
93 /100 Excellent
Development Activity 100
Maintenance 96
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 88
Code Quality 90
Innovation 85
Learning Curve 82

Preact is a fast, lightweight alternative to React that implements the same modern component API — ES6 classes, hooks, and functional components — in roughly 3-4kB gzipped. It provides a highly optimized Virtual DOM diffing algorithm, seamless server-side-render hydration, and a pluggable asynchronous rendering scheduler.

Through the preact/compat alias, Preact offers extensive drop-in compatibility with the React ecosystem, letting most React libraries and components run unmodified on top of Preact’s smaller runtime. It also ships companion packages for debugging (preact/debug), DevTools integration, and hooks, and supports all modern browsers.

What You Get

  • A ~3-4kB Virtual DOM library implementing the same component model as React (classes, hooks, function components)
  • preact/compat, a compatibility layer that lets most React libraries run unmodified on top of Preact
  • First-class hooks support (useState, useEffect, useMemo, etc.) via the built-in preact/hooks package
  • Server-side rendering support with efficient client-side hydration
  • preact/debug for development-time warnings and preact/devtools for browser DevTools integration
  • A pluggable, transparent asynchronous rendering scheduler

Common Use Cases

  • Migrating a React app to a smaller runtime to reduce bundle size and improve load performance
  • Building performance-sensitive, low-bandwidth web apps (PWAs, widgets, embeds) that need a minimal footprint
  • Using existing React component libraries in a Preact app via the preact/compat alias
  • Server-rendering a component tree and hydrating it efficiently on the client

Under The Hood

Architecture - Preact’s core (src/) implements a Virtual DOM diffing engine with dedicated modules for diff, create-element, and component lifecycle handling; compat/ layers a React-API-compatible shim on top of the core renderer, hooks/ implements the hooks runtime independently pluggable into the core, and debug//devtools/ provide opt-in development tooling without bloating the production bundle. Tech Stack - Written in plain JavaScript (with TypeScript type definitions under types/), bundled to ESM (dist/preact.mjs) via Preact’s own build scripts, with jsx-runtime/ providing the automatic JSX transform entry point; monorepo packages (core, compat, hooks, debug, devtools) are versioned and published together. Code Quality - The test/ directory (8 top-level suites, each covering deep sub-scenarios) exercises rendering, hydration, hooks, and compat behavior across browsers via Karma/Vitest, with coverage tracked on Coveralls; a benchmarks/ suite tracks rendering performance regressions, and mangle.json configures aggressive minification tested against a strict size budget enforced in CI. API Design - Preact deliberately mirrors React’s public API (createElement, Component, hooks) so existing React knowledge transfers directly, while preact/compat absorbs most remaining differences (e.g. synthetic event names, forwardRef) transparently, making the migration path from React close to a one-line import swap for many projects.

Used by 19 apps in this directory

TypeScript
92%
MIT

AI Engineer Coach

Developer Tools

4,297

A VS Code extension that reads your local AI coding session logs and turns them into actionable insights — anti-pattern detection across 45 rules, output tracking by model and harness, and skill discovery, with no data leaving your machine.

View details
69
Repo Health
70
Technical
82
Dependency
Built with
TypeScript 92%
Updated 2 weeks ago
TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,924

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
94
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 100%
Updated 2 weeks ago
Rust
67%
MIT

Bun

Developer Tools

96,068

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
64
Dependency
Built with
Rust 67%
C++ 19%
TypeScript 10%
Updated 1 weeks ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,650

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
67
Repo Health
76
Technical
62
Dependency
Built with
JavaScript 90%
Updated 1 months ago
TypeScript
93%
AGPL 3.0

CourseLit

Blogging · Ecommerce

1,268

Open-source, self-hosted LMS for selling online courses, digital downloads, and building communities on your own branded website.

View details
77
Repo Health
74
Technical
68
Dependency
Built with
TypeScript 93%
Updated 1 weeks ago
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,534

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
49
Repo Health
68
Technical
68
Dependency
Built with
TypeScript 88%
Updated 4 months ago
Go
51%
MIT

Fathom Lite

Analytics

8,022

A simple, self-hosted website analytics tool built with Go and Preact that lets you understand your traffic without handing data to third parties.

View details
47
Repo Health
67
Technical
67
Dependency
Built with
Go 51%
JavaScript 31%
CSS 15%
Updated 6 months ago
Ruby
64%
AGPL 3.0

Forem

Blogging · Community

22,783

Open source Ruby on Rails platform for building developer communities with articles, discussions, and social profiles—the same software that powers dev.to.

View details
83
Repo Health
79
Technical
67
Dependency
Built with
Ruby 64%
JavaScript 19%
HTML 13%
Updated 1 weeks ago
TypeScript
98%
Other

Formbricks

Analytics · Design Tools · Forms Surveys

13,031

Open-source experience management platform for in-app, website, email, and link surveys — privacy-first and fully self-hostable.

View details
93
Repo Health
81
Technical
67
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers