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 attempts to achieve as much compatibility with React as possible.
Some React features are intentionally omitted from Preact, either because they are not achievable while meeting the primary project goals listed above or because they don't fit within the scope of Preact's core set of functionality.
The intentional items under Differences to React:
PropTypes, which are easily used as a separate library
Children, can be replaced with native arrays
Synthetic Events, since Preact does not attempt to patch issues in older browsers like IE8