Introduction to Preact — a smaller, faster React alternative

Introduction to Preact — a smaller, faster React alternative

Preact is a JavaScript library that describes itself as a fast 3kB alternative to React with the same ES6 API. As a frequent user of React, I’d always wanted to try out Preact and see what it offers, and the differences between Preact and React. In this article, I’ll do an introduction to Preact, its key concepts and differences between Preact and React.

[…]

Preact has this package called “preact-compat” which works as a compatibility layer between Preact and React. Using preact-compat makes it easy to switch from React to Preact. Switching to Preact can be as easy as installing and aliasing preact-compat in your code.

[…]