Skip to content

Commit

Permalink
Merge pull request #4169 from shaedrich/preact
Browse files Browse the repository at this point in the history
Create topic "Preact.js"
  • Loading branch information
ahpook authored Jan 11, 2024
2 parents 1600550 + b0fa930 commit 6cc07fc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions topics/preact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
aliases: preactjs, preact-js
topic: preact
logo: preact.png
display_name: Preact.js
short_description: Preact.js is a lightweight React alternative with the same API.
related: react, virtual-dom, hmr, jsx, ssr
released: November 14, 2015
github_url: https://github.com/preactjs/preact
url: 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` and `context` are passed to `render()`
* Standard HTML attributes like `class` and `for` can be used instead of `className` and `htmlFor`

Binary file added topics/preact/preact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6cc07fc

Please sign in to comment.