Need advice about which tool to choose?Ask the StackShare community!
Matter vs Preact: What are the differences?
Developers describe Matter as "A tiny collection of UI components". Matter is a tiny collection of UI components. The components are built with Deku. On the other hand, Preact is detailed as "A fast 3k React alternative". Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible, with first-class support for ES2015. Currently the library is around 3kb (minified & gzipped).
Matter and Preact belong to "Javascript UI Libraries" category of the tech stack.
Matter and Preact are both open source tools. Preact with 23.1K GitHub stars and 1.2K forks on GitHub appears to be more popular than Matter with 135 GitHub stars and 12 GitHub forks.
Resource Guru, Bustle, and VN2RAP are some of the popular companies that use Preact, whereas Matter is used by Nuxeo, Fekra Computers, and MEGA Limited. Preact has a broader approval, being mentioned in 9 company stacks & 4 developers stacks; compared to Matter, which is listed in 3 company stacks and 4 developer stacks.
Preact offers an API which is extremely similar to React's for less than 10% of its size (and createElement
is renamed to h
, which makes the overall bundle a lot smaller). Although it is less compatible with other libraries than the latter (and its ecosystem is nowhere as developed), this is generally not a problem as Preact exposes the preact/compat
API, which can be used as an alias both for React and ReactDOM and allows for the use of libraries which would otherwise just be compatible with React.
Pros of Matter
Pros of Preact
- Lightweight15
- Drop-in replacement for React5
- Performance4
- Props/state passed to render3
- ES6 class components1