Preact
lit
Preact | lit | |
---|---|---|
118 | 163 | |
36,913 | 18,898 | |
0.4% | 0.9% | |
9.2 | 8.6 | |
2 days ago | 9 days ago | |
JavaScript | TypeScript | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Preact
-
Dependency management fatigue, or why I forever ditched React for Go+Htmx+Templ
> React is a small rendering library
Sorry, can't agree. React is a state management library that also attaches efficient rendering on top of the DOM diff it computes as it propagates the state changes.
This allows React apps to remain so simple (one function per component) and so composable without turning into an unmanageable dish of callback / future spaghetti.
There is a number of other VDOM libraries, but what sets React apart is the data / state flow strictly in one direction. This allows to reap many of the benefits of functional programming along the way, like everything the developer sees being immutable; not a coincidence.
Regarding the size, preact [1] is mostly API-compatible, but also absurdly small (3-4 kB minified), actually smaller than HTMX (10 kB). But with preact you likely also want preact-iso, so the size grows a little bit.
[1]: https://preactjs.com/
-
Preact vs React: Which Framework is Right for Your Next Project?
Performance and user experience have become the lifeline of modern web development. Two libraries that have gained immense popularity among developers for developing interactive user interfaces are React and Preact.
-
Deploying my Astro + Turso + Drizzle project to Cloudflare Pages
For rendering the map, I went with Preact and deck.gl.
-
Build Web Apps Absurdly Fast with Vite
This command creates a new Vite project with React. Feel free to replace “react” with “vue” or “vanilla” if that’s more your jam. Svelte, Preact, Qwik, and others are supported, too!
-
Mitosis - Using Astro.js as the dev server to preview the component with hot-reload
Note: Astro supports a variety of popular frameworks including React, Preact, Svelte, Vue, SolidJS, AlpineJS and Lit with official integrations. While for other frameworks e.g. Angular and Qwik, you may still benefit from this tutorial and you would need to further set up the community maintained framework integrations.
-
7 Most Popular JavaScript Front-End Frameworks in 2024 Visualized with Graphs 📊📈
GitHub | npm | website
-
Preact vs React: A Comparative Guide
In this post, we get to know more about Preact, one of this year's trending libraries. And we'll compare it to React to see which one suits better for our projects.
-
Episode 24/13: Native Signals, Details on Angular/Wiz, Alan Agius on the Angular CLI
Similarly to Promises/A+, this effort focuses on aligning the JavaScript ecosystem. If this alignment is successful, then a standard could emerge, based on that experience. Several framework authors are collaborating here on a common model which could back their reactivity core. The current draft is based on design input from the authors/maintainers of Angular, Bubble, Ember, FAST, MobX, Preact, Qwik, RxJS, Solid, Starbeam, Svelte, Vue, Wiz, and more…
-
Proposal: Signals as a Built-In Primitive of JavaScript
Those who want to develop a library that can be used by any other reactive framework. I often see SignalLike type that tries to subtype it.
https://github.com/preactjs/preact/blob/757746a915d186a90954...
-
Preact: Lightweight React Alternative
The official Preact documentation.
lit
-
The Caveats of Web Components
This works but it's not a good idea to create these manually. Since that creates a lot of maintenance and we can run into out of sync issues with the api. To make this less tedious. Both Lit (see here) and Stencil (see here) provide a cli to create these automatically. However the need to create these wrapper components in the first place is additional overhead. If the framework of your choice properly supports web components you shouldn't have to create wrapper components.
-
Stateless and stateful components. No! Reusable views in Elm.
Lit - A library that helps you build native web components
-
Deprecating Your Web Component APIs
In this example I will be using Lit, but these features and principles can be applied to any environment.
-
Bullet-Proof Web Component APIs
NOTE: The code examples are using Lit, but the principles discussed here can be applied to other libraries and frameworks.
- Lit: Simple. Fast. Web Components
-
Rails developers should embrace Web Component
Lit is a library for developing Web Components, mainly developed by Google. According to the official introduction, the Lit development team participated in the formulation of the Web Component standard.
-
Lit - Lighting Fast Web Components
Lit is a small library, built on top of web components, that makes it much easier to build interoperable web components. The team released Lit version 3 last year, and I just got around to trying it out. I'm impressed with what Lit is capable of. There are a few things missing that I'd want to see before building out a major application, like a router API, but it seems like a great fit if you need to build some web components to drop into an existing site. It might even be nice for a framework agnostic design system.
-
Web Components Are Okay
I dig WebComponents because I love building on standards which promote interoperability across frameworks and have long term lifelines. Standards reduce platform + dev lock-in and reduce framework balkanization and frankly chaos in many cases. You are a better developer if you understand the root standards and core systems, which WebComponents get you closer to.
I also like the Lit Framework (https://lit.dev/) from Google which is rarely mentioned but it is quite nice for some of the simplifications and extras you might need when building them but it doesn't get in the way or try to take over your entire domain with dev-lockin.
Whether going direct to WebComponents or a higher level simplification like Lit, they really are a freedom from dev lock-in that is nice to see.
-
Building Custom Trees in Umbraco 14 using menus!
For a basic tree with, I prefer using a menu with custom-rendered menu items using a custom Lit element, as I will demonstrate in this example.
-
Getting Started with Mitosis: Creating a Cross-Framework Design System
Although web components offer a modular and reusable approach to UI elements, these challenges can limit their viability. However, if supporting web components is a requirement, you can use Mitosis to generate them from a single source of truth. Mitosis supports Stencil, Lit, and raw web components as outputs.
What are some alternatives?
react-18 - Workgroup for React 18 release.
Svelte - web development for the rest of us
Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.
stencil - A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
solid - A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js - This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
Angular - Deliver web apps with confidence 🚀
htmx - </> htmx - high power tools for HTML
lit-element - LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
minze - Dead-simple JS framework for native web components.