{"id":718,"slug":"preact","name":"Preact.js","short_description":"Preact.js is a lightweight React alternative with the same API.","url":"https://github.com/topics/preact","github_count":2324,"created_by":null,"logo_url":"https://explore-feed.github.com/topics/preact/preact.png","released":"November 14, 2015","wikipedia_url":null,"related_topics":["react","virtual-dom","hmr","jsx","ssr"],"aliases":["preactjs","preact-js"],"github_url":"https://github.com/preactjs/preact","content":"\u003cp\u003e\u003cstrong\u003ePreact.js\u003c/strong\u003e is a lightweight React alternative with the same API.\u003c/p\u003e\n\n\u003ch1 id=\"similarities-to-react\"\u003eSimilarities to React\u003c/h1\u003e\n\u003cul\u003e\n  \u003cli\u003eES6 Class, hooks, and Functional Components\u003c/li\u003e\n  \u003cli\u003eCompatibility via a simple preact/compat alias\u003c/li\u003e\n  \u003cli\u003eJSX, VDOM, DevTools, HMR, SSR.\u003c/li\u003e\n  \u003cli\u003eCross-browser compatibility\u003c/li\u003e\n  \u003cli\u003eTransparent asynchronous rendering with a pluggable scheduler\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch1 id=\"differences-from-react\"\u003eDifferences from React\u003c/h1\u003e\n\u003cul\u003e\n  \u003cli\u003eWorks in the browser without any transpilation steps\u003c/li\u003e\n  \u003cli\u003eSyntactic sugar\n    \u003cul\u003e\n      \u003cli\u003e\u003ccode class=\"language-plaintext highlighter-rouge\"\u003eprops\u003c/code\u003e, \u003ccode class=\"language-plaintext highlighter-rouge\"\u003estate\u003c/code\u003e and \u003ccode class=\"language-plaintext highlighter-rouge\"\u003econtext\u003c/code\u003e are passed to \u003ccode class=\"language-plaintext highlighter-rouge\"\u003erender()\u003c/code\u003e\u003c/li\u003e\n      \u003cli\u003eStandard HTML attributes like \u003ccode class=\"language-plaintext highlighter-rouge\"\u003eclass\u003c/code\u003e and \u003ccode class=\"language-plaintext highlighter-rouge\"\u003efor\u003c/code\u003e can be used instead of \u003ccode class=\"language-plaintext highlighter-rouge\"\u003eclassName\u003c/code\u003e and \u003ccode class=\"language-plaintext highlighter-rouge\"\u003ehtmlFor\u003c/code\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n","created_at":"2024-07-29T13:54:24.542Z","updated_at":"2026-06-02T00:24:37.810Z","topic_url":"https://awesome.ecosyste.ms/api/v1/topics/preact","html_url":"https://awesome.ecosyste.ms/topics/preact","projects_url":"https://awesome.ecosyste.ms/api/v1/projects?keyword=preact","lists_url":"https://awesome.ecosyste.ms/api/v1/lists?topic=preact"}