Skip to content

Commit 6cc07fc

Browse files
authored
Merge pull request #4169 from shaedrich/preact
Create topic "Preact.js"
2 parents 1600550 + b0fa930 commit 6cc07fc

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

topics/preact/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
aliases: preactjs, preact-js
3+
topic: preact
4+
logo: preact.png
5+
display_name: Preact.js
6+
short_description: Preact.js is a lightweight React alternative with the same API.
7+
related: react, virtual-dom, hmr, jsx, ssr
8+
released: November 14, 2015
9+
github_url: https://github.com/preactjs/preact
10+
url: https://preactjs.com/
11+
---
12+
**Preact.js** is a lightweight React alternative with the same API.
13+
14+
# Similarities to React
15+
* ES6 Class, hooks, and Functional Components
16+
* Compatibility via a simple preact/compat alias
17+
* JSX, VDOM, DevTools, HMR, SSR.
18+
* Cross-browser compatibility
19+
* Transparent asynchronous rendering with a pluggable scheduler
20+
21+
# Differences from React
22+
* Works in the browser without any transpilation steps
23+
* Syntactic sugar
24+
* `props`, `state` and `context` are passed to `render()`
25+
* Standard HTML attributes like `class` and `for` can be used instead of `className` and `htmlFor`
26+

topics/preact/preact.png

24.4 KB
Loading

0 commit comments

Comments
 (0)