зеркало из https://github.com/github/explore.git
926 B
926 B
aliases | topic | logo | display_name | short_description | related | released | github_url | url |
---|---|---|---|---|---|---|---|---|
preactjs, preact-js | preact | preact.png | Preact.js | Preact.js is a lightweight React alternative with the same API. | react, virtual-dom, hmr, jsx, ssr | November 14, 2015 | https://github.com/preactjs/preact | https://preactjs.com/ |
Preact.js is a lightweight React alternative with the same API.
Similarities to React
- ES6 Class, hooks, and Functional Components
- Compatibility via a simple preact/compat alias
- JSX, VDOM, DevTools, HMR, SSR.
- Cross-browser compatibility
- Transparent asynchronous rendering with a pluggable scheduler
Differences from React
- Works in the browser without any transpilation steps
- Syntactic sugar
props
,state
andcontext
are passed torender()
- Standard HTML attributes like
class
andfor
can be used instead ofclassName
andhtmlFor