Preact

Fast 3KB React alternative with the same modern API. Full React compatibility via preact/compat shim that makes existing React code run on Preact without changes. Ships with Signals — fine-grained reactive state that bypasses virtual DOM diffing for better performance. Used by Google, Etsy, and others for performance-critical web applications. Ideal when React's ~40KB bundle size is a concern.

Evaluated Mar 07, 2026 (0d ago) v10.x
Homepage ↗ Repo ↗ Developer Tools react lightweight performance 3kb virtual-dom compatible islands signal
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
92
/ 100
Is it safe for agents?
⚡ Reliability
88
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
95
Auth Strength
92
Scope Granularity
90
Dep. Hygiene
90
Secret Handling
95

Client-side rendering library. Same XSS prevention model as React (JSX auto-escaping). MIT licensed and open source. No telemetry or data collection.

⚡ Reliability

Uptime/SLA
88
Version Stability
90
Breaking Changes
88
Error Recovery
85
AF Security Reliability

Best When

Bundle size is critical (widgets, embeds, performance-sensitive landing pages) and you need a React-compatible API at a fraction of the size.

Avoid When

Your React dependencies use React internals not covered by preact/compat — test compatibility before migrating production applications.

Use Cases

  • Replace React with a 3KB alternative in bundle-size-critical applications (marketing pages, widgets, embeds) where React's size is unacceptable
  • Use preact/compat to run existing React code on Preact with minimal changes — aliased imports provide compatibility layer
  • Build high-performance components using Preact Signals for reactive state that updates DOM without virtual DOM re-diffing
  • Build Preact Island architectures for partially hydrated static sites where only interactive islands use JavaScript
  • Embed interactive components in non-SPA pages (e-commerce PDPs, landing pages) where small JS bundle size matters most

Not For

  • Large applications with extensive React ecosystem dependencies — some packages assume React internals not exposed in Preact/compat
  • Teams new to the React ecosystem — Preact is an optimization; start with React and migrate if bundle size becomes a problem
  • Applications using React Native — Preact is web-only; React Native requires React

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No authentication — UI rendering library.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Completely free. Community-maintained with backing from multiple companies.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • preact/compat provides React compatibility but not 100% API parity — some packages using React internals (forwardRef with older patterns, unstable APIs) may not work
  • Preact Signals is not the same as React state — useState/useReducer and signals have different update semantics; mixing them requires care
  • React DevTools browser extension doesn't work with Preact — use Preact DevTools extension for debugging
  • JSX pragma must be set to h or use Preact's new JSX transform — wrong pragma causes 'h is not defined' errors
  • preact/compat alias must be configured in bundler (webpack/vite) for React packages to transparently use Preact — missing alias means shipping both
  • Preact's virtual DOM differs from React's in edge cases (key handling, event delegation) — thorough testing required when migrating

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for Preact.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6255
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered