Command Palette

Search for a command to run...

position in category
#5

Lightweight JavaScript library for building interactive UIs with a React-compatible API. Provides virtual DOM rendering, hooks, and functional components in about 3KB gzipped, roughly an order of magnitude smaller than React plus ReactDOM.

Adopted for mobile-first apps, embedded widgets, and performance-critical pages where bundle size and parse time matter. Preact differentiates from React by using native browser events instead of a synthetic event system, and ships a compatibility layer, preact/compat, so most React ecosystem libraries and tooling work with minimal changes. Teams often swap React for Preact in existing projects to cut payload and improve load performance on slow networks.

Key capabilities:

  • React-style API with hooks, functional components, and class components
  • preact/compat for drop-in compatibility with React libraries and JSX tooling
  • Built-in Signals for fine-grained reactivity without Virtual DOM updates
  • Virtual DOM with native events, faster parse time than React on constrained devices
  • Server-side rendering, DevTools, and HMR support

Teams use Preact for mobile-first SPAs, embedded dashboards and widgets, performance-sensitive landing pages, and projects where every kilobyte affects Core Web Vitals. Developers can migrate existing React codebases with minimal changes via compat, or start fresh and benefit from a smaller runtime and faster cold starts. Works with standard React build tooling including Vite, webpack, and Babel.

GitHub Repositories
208
-8.4%
Trending down this week
Removed in 19 repos