shlogg · Early preview
Ramu Narasinga @karthik-m22

Preact Used In React-scan Source Code Analysis.

Preact is a fast 3kB alternative to React with the same modern API. It's used in react-scan source code, mainly for its performance and efficiency features. Approximately 38 files use Preact, but only one file imports from "react".

In this article, we analyze how Preact is used in react-scan source code. 

  
  
  What is Preact?

Preact is a fast 3kB alternative to React with the same modern API. There is a Preact tutorial available. 

  
  
  Preact’s Goals

Preact aims to deliver on a few key goals:

Performance: Render quickly & efficiently
Size: Small size, lightweight (approximately 3.5 kB)
Efficiency: Effective memory usage (avoiding GC thrash)
Understandability: Understanding the codebase should take no more than a few hours
Compatibility: Preact aims to be largely compatible with the React API. preact/compat att...