preact
GitHub describes it as ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.
preactjs/preact: README details
GitHub describes it as ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.
Repository scope
GitHub describes it as ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. The README describes the project this way: [!NOTE] This is the branch for the upcoming release, for patches to v10 you need the v10.x branch
README details
The README section "README details" states: - Familiar React API & patterns: ES6 Class, hooks, and Functional Components - Extensive React compatibility via a simple [preact/compat] alias - Everything you need: JSX, VDOM , [DevTools], HMR , SSR . - Highly optimized diff algorithm and seamless hydration from Server Side Rendering - Supports all modern browsers - Transparent asynchronous rendering with a pluggable scheduler
Getting Started
The README section "Getting Started" states: With Preact, you create user interfaces by assembling trees of components and elements. Components are functions or classes that return a description of what their tree should output. These descriptions are typically written in JSX (shown underneath), or HTM which leverages standard JavaScript Tagged Templates. Both syntaxes can express trees of elements with "props" (similar to HTML attributes) and children.
Getting Started
The README section "Getting Started" states: To get started using Preact, first look at the render() function. This function accepts a tree description and creates the structure described. Next, it appends this structure to a parent DOM element provided as the second argument. Future calls to render() will reuse the existing tree and update it in-place in the DOM. Internally, render() will calculate the difference from previous outputted structures in an attempt to perform as few DOM operations as possible.
Editorial conclusion
The repository README is the source for this review. It does not replace a local installation or an independent test.
Community notes