Svelte
lit
Our great sponsors
- Appwrite - The open-source backend cloud platform
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Sonar - Write Clean JavaScript Code. Always.
- Revelo Payroll - Free Global Payroll designed for tech teams
- Onboard AI - Learn any GitHub repo in 59 seconds
Svelte | lit | |
---|---|---|
599 | 126 | |
72,867 | 15,780 | |
1.1% | 1.0% | |
9.6 | 9.3 | |
3 days ago | 7 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.
Svelte
-
How to create a simple VSCE for CSS Lube
My solution to this was to implement an HTML AST parser and use it, even if support for JSX would be postponed until later. Looking at the issues of Svelte, it seemed that there was no parser that met my requirements, and I created an AST parser for it myself. The principle is simple. The starting point of a script block can be identified using {. The starting point of a string can be identified using ', ", or backtick. If } appears outside of a string, it indicates the end of the script block. The challenge is to determine when a string ends. For example, in the case of backticks, I used the following regular expression to find the end point of backticks.
-
🌲Svelte + 🍃Leaflet + 📍 Clusters
For a personal project, I had to use Leaflet with Svelte, and I faced some problems during development.
-
Building a Map Application with MapLibre GL JS and Svelte
Svelte v4.0.5
-
Top 5 Js Frameworks
4. Svelte
-
👩🏾💻React for beginners: an overview
Svelte: Svelte is a free and open-source front-end component framework or language created by Rich Harris and maintained by the Svelte core team members.
-
How can I setup a Svelte input bind:value={v}, when v is a map of map?
I'm aware of the "Bind to a Map() Object not possible #5721" issue, but while I'm waiting for it to be completed, and also for my personal culture, I'd like to find out how to implement it.
-
Things you forgot because of React
If you don't already have a backend framework, I see no reason to disagree with TFA's recommendation of Svelte/SvelteKit[0]. It's simple, there's no runtime framework magic to debug, everything works exactly like you assume it does, it's pretty darn fast, and the DSL syntax isn't easily confused for the HTML it's templating (looking at you, Vue).
If you do have a backend framework, then having the backend drive the reactivity is a pretty great way to go, so HTMX[1] is the least obtuse way of putting the most power in the hands of the backend. Really makes 'a light sprinkling of JS for interactivity' closer to reality than vanilla JS allows, without adding cognitive overhead.
[0]: https://svelte.dev/
-
Setting JavaScript framework standards ( what’s wrong with the React-set standard and why everyone should be like Svelte)
React is great, yeah, absolutely no lies. Released on May 29 2013 and maintained by Facebook (coughs - “Meta”), it has grown to be the the most used JavaScript framework - or library 🌚, Suppressing Angular and kicking jQuery in the nuts. The standard way of building web apps has so far been defined by this superhuman framework and it’s been the most recommended framework for a long time, but what if it’s about to change?. React, for all its glory sadly is shit ( we all know it, yes. But we won’t admit it), it’s sadly gone down the over complexity road that so many of our beloved frameworks have and has been a messy mud fest. In this article, we will look at some aspects of React’s web standards that are not so brilliant and why Svelte should set the latest standards for JavaScript frameworks and web development. Now you might not agree with me, but hopefully after this is over you’ll take a good look at yourself and say, “maybe this bloke might be right”.
-
Svelte 5 is going to be radical
I don't want to dismiss Svelete entierly but this code `` smells like old bad ideas instead of fresh air.
It is yet another custom templating language with its unique limits [0].
If I have an option i'll stick with JSX.
-
Get Started: Must Know Website Builders for 2023
JavaScript Frameworks: JavaScript frameworks like React, Angular, Vue, and Svelte allow you to build interactive sites. They have a steeper learning curve but enable complex functionality like single-page applications. These are great for web developers.
lit
-
Svelte 5: Runes
That is exactly my experience after trying svelte/sveltekit for 2 months. Loved svelte at first sight but soon their own invented complexity (and a very confusing error log) made me realize that I was changing React for something quite similar (with a bunch of different problems). In place of going back to React tho, I tried the next one in my list: Lit. No regrets, found the (powerful) simplicity I was looking for. Give it a try before getting back to React: https://lit.dev/
-
An Overview of 25+ UI Component Libraries in 2023
Shoelace: Being built with web components means this library is framework agnostic, however, React is the only framework that was entitled to get first-class support. It also has built-in localization, and the components were built with Lit. Keep in mind that if you want the get your component content in SSR, this might not fit your needs.
-
Service Worker Templating Language (SWTL)
While I was able to achieve this fairly easily, the developer experience of manually stitching strings together wasnt great. Being myself a fan of buildless libraries, such as htm and lit-html, I figured I'd try to take a stab at implementing a DSL for component-like templating in Service Workers myself, called Service Worker Templating Language (SWTL), here's what it looks like:
-
Shadow DOM: Not by Default
This doesn't mean you are required to write vanilla JavaScript web components either. If you are familiar with using Fast or Lit to write web components you can include those libraries in you Enhance application. However, with the introduction of Enhance base classes for the light and shadow DOM you can get the same DX improvements where you write less boilerplate web component code while enabling the sharing of a render method between the SSR and CSR rendering.
-
Things you forgot because of React
I like plain Web Components (HTMLElement). It's actually really simple to build apps without any frameworks or blunders these days. I also looked into Lit https://lit.dev/ - I like it because it's very lightweight and provides the bare minimum features you need from a framework.
-
If Web Components are so great, why am I not using them?
I've been using web components now for years and I will do everything I can to never write frontends in anything else. I totally agree with point 2 though: the Polymer phase was very weird, but, as mentioned, https://lit.dev is great and, imo, the perfect abstraction.
Lit framework provides a bunch of sugar that brings the dev experience closer to JSX
The nice thing is that if you're using a library like Lit or Svelte, you won't have to bother with the web component API much at all. https://svelte.dev/docs/custom-elements-api https://lit.dev/
-
Possible to use OOP in a Vanilla JS app?
If you like the feel of web components, you might also check out lit which is a thin wrapper around web components
-
World Wide Web Wars
Web Components have had more than enough time to be a thing, they're still not a thing and the problem they were made to solve is not a problem anymore (Modules). What's left of Web Components is a JavaScript web framework called Lit with a contrived browser integration that cost them a decade to implement.
What are some alternatives?
Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.
solid - A declarative, efficient, and flexible JavaScript library for building user interfaces. [Moved to: https://github.com/solidui/solid]
qwik - Instant-loading web apps, without effort
awesome-blazor - Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Next.js - The React Framework
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.
SvelteKit - web development, streamlined
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.
Vue.js - This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
Gatsby - The best React-based framework with performance, scalability and security built in.
astro - The web framework that scales with you — Build fast content sites, powerful web applications, dynamic server APIs, and everything in-between ⭐️ Star to support our work!