Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
#

Preact.js

preact logo

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
    • <ul>
      
        <li><code class="language-plaintext highlighter-rouge">props</code>, <code class="language-plaintext highlighter-rouge">state</code> and <code class="language-plaintext highlighter-rouge">context</code> are passed to <code class="language-plaintext highlighter-rouge">render()</code></li>
      
        <li>Standard HTML attributes like <code class="language-plaintext highlighter-rouge">class</code> and <code class="language-plaintext highlighter-rouge">for</code> can be used instead of <code class="language-plaintext highlighter-rouge">className</code> and <code class="language-plaintext highlighter-rouge">htmlFor</code></li>
      
      </ul>
      

      Here are 2,171 public repositories matching this topic...

      Released November 14, 2015

      Latest release 18 days ago

      Followers
      38 followers
      Repository
      preactjs/preact
      Website
      github.com/topics/preact

      Related topics

      hmr jsx react ssr virtual-dom
      Morty Proxy This is a proxified and sanitized view of the page, visit original site.