lit-state
uibuilder
lit-state | uibuilder | |
---|---|---|
3 | 6 | |
137 | 128 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | about 4 years ago | |
JavaScript | TypeScript | |
GNU Lesser General Public License v3.0 only | MIT 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.
lit-state
-
Web Components Eliminate JavaScript Framework Lock-In
The reason React uses a virtual DOM is because when React started, there were no (advanced) HTML templates yet. And it made it easy to setup listeners on elements, instead of manually adding it with `addEventListener()` and possibly remove them again with `removeEventListener()`. So the virtual DOM was really a game changer.
But Lit templates solve this problems in a more browser integrated way, without the need of a virtual DOM. How you manage the state is free to your choice, that is also not something exclusive to React and your favorite pattern can also be used with Lit. I wrote a tiny state management library (LitState [0]) which makes it very easy for multiple components to share the same state and stay in sync. I personally find it much more convenient and cleaner than any other state library I've used before. And it integrates very nicely with Lit.
[0]: https://github.com/gitaarik/lit-state
- Web Components Will Outlive Your JavaScript Framework
- Litstate Simple Shared App State Management For
uibuilder
- Web Components Will Outlive Your JavaScript Framework
- If Web Components are so great, why am I not using them?
- Ask HN: Good resource on writing web app with plain JavaScript/HTML/CSS
-
AlpineJS – Lightweight JavaScript Framework
This looks bad. I see custom syntax, and JavaScript embedded into HTML in a way that cannot be syntax-checked at build time.
If you want a lightweight framework check out UIBuilder instead: https://github.com/wisercoder/uibuilder
Same JSX syntax as React, but this lib is very simple -- just over 200 lines of source code.
-
Virtual DOM is pure overhead
If you don't need Virtual DOM then Web Components are a great idea for building reusable components that work with all frameworks, including React. You can even use JSX to build Web Components: https://github.com/wisercoder/uibuilder
What are some alternatives?
lit - Lit is a simple library for building fast, lightweight web components.
svelte-query - Performant and powerful remote data synchronization for Svelte
kor - User Interface Component Library based on LitElement / lit-html
react-svelte - Use Svelte components inside a React app
panel - Web Components + Virtual DOM: web standards for powerful UIs
Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.
lrnwebcomponents - HAXTheWeb monorepo of elements and apis
budibase - Budibase is an open-source low code platform that helps you build internal tools in minutes 🚀
WebComponentFactory - Make use of JavaScript web components while keeping your code in .html for LSP features
fastdom - Eliminates layout thrashing by batching DOM measurement and mutation tasks
lit-style - Shared component styles for LitElement
proposal-import-attributes - Proposal for syntax to import ES modules with assertions