Preact VS lit

Compare Preact vs lit and see what are their differences.

Preact

⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM. (by preactjs)

lit

Lit is a simple library for building fast, lightweight web components. (by lit)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
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
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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

Posts with mentions or reviews of Preact. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-12-03.

lit

Posts with mentions or reviews of lit. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-12-05.
  • The Caveats of Web Components
    5 projects | dev.to | 5 Dec 2024
    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.
    8 projects | dev.to | 5 Dec 2024
    Lit - A library that helps you build native web components
  • Deprecating Your Web Component APIs
    1 project | dev.to | 27 Nov 2024
    In this example I will be using Lit, but these features and principles can be applied to any environment.
  • Bullet-Proof Web Component APIs
    1 project | dev.to | 12 Nov 2024
    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
    1 project | news.ycombinator.com | 18 Oct 2024
  • Rails developers should embrace Web Component
    4 projects | dev.to | 17 Oct 2024
    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
    3 projects | dev.to | 11 Oct 2024
    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
    7 projects | news.ycombinator.com | 29 Sep 2024
    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!
    2 projects | dev.to | 25 Sep 2024
    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
    3 projects | dev.to | 13 Sep 2024
    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?

When comparing Preact and lit you can also consider the following projects:

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.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured