panel
panel | nonio-frontend | |
---|---|---|
1 | 1 | |
272 | 21 | |
0.4% | - | |
5.7 | 7.1 | |
3 months ago | 30 days ago | |
JavaScript | JavaScript | |
- | 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.
panel
-
Web Components Will Outlive Your JavaScript Framework
Webcomponents will outlive React 13, mostly likely. Will they outlive React entirely or its cousins like Solid and Svelte? Perhaps not.
Webcomponents and React look like they solve the same problem but they do not.
Webcomponent api is pretty shallow. You get connected/disconnnected/attributeChanged call back but gotta write your own property setter and getters, and that’s mostly it. Shadow dom becomes a pain to work with if something needs to pierce it. Can’t pass nested objects in attributes, gotta encode as string.
Mixpanel went all in on webcomponents, but had to build a whole bunch of lib tooling around it. They made their own framework on top of webcomponents. https://github.com/mixpanel/panel
Worked on panel lib and webcomponent UI for many years. It is not a silver bullet.
The issue with webcomponents is there are a ton of libraries that fill in the missing gaps. There’s not a lot you can do with pure vanilla webcomponent api since browsers don’t provide efficient dom updating mechanism. Google has their own thing, Microsoft had multiple internal libs across orgs, Reddit does their own thing.
The most standard thing for frontend with wide adoption right now is React.
So the way I see it, is that React has already outlived webcomponents.
nonio-frontend
-
Web Components Will Outlive Your JavaScript Framework
> Finally, the last thing I would suggest is that writing an entire app in vanilla web components is kind of crazy talk in my opinion. For 5kb you can have a super nice developer experience using Lit (https://lit.dev)
I 100% agree with this. For me it was more of a question of "can I do it", and that was something I wanted to find out. You notice that I ended up having to recreate a significant chunk of lit-like functionality on my own via a base class: https://github.com/jjcm/nonio-frontend/blob/master/component...
I would very much recommend not going full vanilla. Using a library like lit will definitely help making things easier/more polished, and will integrate better with existing tooling.
What are some alternatives?
lit-state - Simple shared component state management for LitElement.
web-components-examples - A series of web components examples, related to the MDN web components documentation at https://developer.mozilla.org/en-US/docs/Web/Web_Components.
lit - Lit is a simple library for building fast, lightweight web components.
joystick - A full-stack JavaScript framework for building stable, easy-to-maintain apps and websites.
router - Small and powerful client-side router for Web Components. Framework-agnostic.
uibuilder - Typed HTML templates using TypeScript's TSX files