
About Preact
Preact is a small library for building user interfaces with components and a virtual DOM. It keeps the API close to React, so many React habits and patterns carry over.
What it does
You write components that return markup, and Preact updates the page efficiently when state or props change. It batches updates and uses a simple diff, which keeps work small. Preact can run directly in the browser without a build step, which makes it handy for adding interactive parts to an existing page.
Key features
- Virtual DOM in a very small package
- Props, state and context passed to render
- Standard HTML attributes such as class and for
- Runs in the browser without transpiling
Who it's for
Frontend developers who want React-style components with less JavaScript to download. It suits widgets embedded in other sites, performance-sensitive apps and teams that want to move from React without a large rewrite.
Pricing and good to know
Preact is open source under the MIT licence and free to use. Many React libraries work with it through a compatibility layer, but not every package will, so test the ones you depend on. The project is sponsored by companies, and its docs include a guide for new users.
Highlights
- Virtual DOM in a very small package
- Components with props, state and context
- Standard HTML attributes in markup
- Runs in the browser with no build step












