# Preact

⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

Repository: https://github.com/preactjs/preact
Canonical: https://ross.abutalabs.com/products/preact
Homepage: https://preactjs.com
Language: JavaScript
License: MIT
License Family: permissive
Topics: preact, jsx, react, virtual-dom, components, dom, vdom
Last push: 2026-08-26T07:47:12+00:00
Link (homepage): https://preactjs.com
Link (site_page): https://preactjs.com/about/project-goals
Link (site_page): https://preactjs.com/guide/v10/getting-started
Link (site_page): https://preactjs.com/about/we-are-using
Link (site_page): https://preactjs.com/about/libraries-addons

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 95, longevity 100
- inputs: {"age_days": 4009, "days_push": 7, "days_rel": 32, "gap_med": 13, "n_releases_24m": 38}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 38834, forks 2046 (observed 2026-08-28T04:12:07.678541+00:00)

## What it is
Preact is a fast, ~3-4kB JavaScript library offering a React-compatible API with components, hooks, JSX, and a highly optimized Virtual DOM. It includes an ecosystem with preact/compat for React compatibility, preact-cli for PWA scaffolding, and preact-router, and supports SSR and hydration.

## Use cases
- build a lightweight single-page app without React's bundle size
- embed interactive UI widgets into an existing website
- migrate an existing React app to a smaller runtime via preact/compat
- scaffold a progressive web app quickly with preact-cli
- render components server-side with SSR and hydration
- write components with JSX or HTM without a build step
- add client-side routing to a Preact app

## When to choose
- bundle size and load performance are critical
- you want React's API and ecosystem compatibility in a tiny footprint
- embedding components into widgets or pages with minimal overhead
- targeting modern browsers without heavy tooling

## When to avoid
- you rely on React features Preact omits, like PropTypes, synthetic events, or certain concurrent behaviors
- your project depends on React libraries that require full React internals
- you need long-term legacy browser support like IE11 (use Preact 10.x instead)

## Facets
- artifact type: library
- maturity: stable
- function: frontend-framework, ssr, routing, ui-components
- domain: web-development, frontend
- platform: browser, cross-platform
- tags: react-alternative, virtual-dom, jsx, hooks, lightweight, pwa, preact-cli, preact-router, nodejs, web-server

## Member repositories
- preactjs/preact (main) score 98
- preactjs/preact-cli (plugin) score 23
- preactjs/preact-router (plugin) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:07.678541+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:24:49.468134+00:00, confidence not recorded.
  - readme: https://github.com/preactjs/preact (fetched 2026-08-28T04:12:07.678541+00:00, sha d78a5ec87131)
  - homepage: https://preactjs.com (fetched 2026-08-29T07:48:01.391603+00:00, sha d12bde92a971)
  - site_page: https://preactjs.com/about/demos-examples (fetched 2026-08-29T07:48:01.407305+00:00, sha 2d1aa7e40993)
  - site_page: https://preactjs.com/about/project-goals (fetched 2026-08-29T07:48:01.409074+00:00, sha 41c2e63f3f20)
  - site_page: https://preactjs.com/guide/v10/getting-started (fetched 2026-08-29T07:48:01.401330+00:00, sha 1baad012dd68)
  - site_page: https://preactjs.com/about/we-are-using (fetched 2026-08-29T07:48:01.403674+00:00, sha e8598d9fe64a)
  - site_page: https://preactjs.com/about/libraries-addons (fetched 2026-08-29T07:48:01.405531+00:00, sha d273d297244e)
  - site_page: https://preactjs.com/about/browser-support (fetched 2026-08-29T07:48:01.410664+00:00, sha 2e2a90dfd4a8)
  - site_page: https://preactjs.com/guide/v11/getting-started (fetched 2026-08-29T07:48:01.412290+00:00, sha c13a4850b10f)
  - registry_npm: https://registry.npmjs.org/preact-cli (fetched 2026-08-29T07:48:01.414326+00:00, sha 4238313d4c3c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
