whatisgithub

What is preact?

josdejong/preact — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2016-08-04

JavaScriptAudience · developerComplexity · 2/5DormantSetup · moderate

In one sentence

A 3-kilobyte JavaScript library that builds interactive web UIs the same way React does, using a virtual DOM, but far smaller and faster to load.

Mindmap

mindmap
  root((repo))
    What it does
      Builds UI components
      Virtual DOM diffing
      3KB library size
    Tech stack
      JavaScript
      JSX
      Preact
    Use cases
      Fast mobile websites
      Embedded widgets
      React-like development
    Audience
      Developers
      Performance-focused teams
    Notable features
      Linked State
      Routing add-on
      React compatibility layer

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add interactivity to a mobile website without the overhead of a full framework.

USE CASE 2

Build performance-sensitive embedded widgets that need to load instantly.

USE CASE 3

Reuse existing React knowledge and patterns like state, props, and lifecycle methods.

USE CASE 4

Server-render a universal app or add client-side routing using Preact's add-ons.

What is it built with?

JavaScriptJSXPreact

How does it compare?

josdejong/preact3rd-eden/ircb.ioa15n/a15n
LanguageJavaScriptJavaScriptJavaScript
Last pushed2016-08-042016-11-162019-04-07
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyeasy
Complexity2/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a build tool like Webpack or Babel since it only supports modern ES6 JSX syntax.

Copy-paste prompts

Prompt 1
Show me how to build a ticking clock component in Preact like the one in this repo's examples.
Prompt 2
Help me set up Webpack or Babel to bundle a Preact project from scratch.
Prompt 3
Explain how Preact's virtual DOM updates only the changed parts of the page.
Prompt 4
Walk me through using Linked State to simplify a form input bound to component state.
Prompt 5
Compare switching an existing React component to Preact using the compatibility layer.

Frequently asked questions

What is preact?

A 3-kilobyte JavaScript library that builds interactive web UIs the same way React does, using a virtual DOM, but far smaller and faster to load.

What language is preact written in?

Mainly JavaScript. The stack also includes JavaScript, JSX, Preact.

Is preact actively maintained?

Dormant — no commits in 2+ years (last push 2016-08-04).

How hard is preact to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is preact for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.