I started Solarite several years ago because I wanted something simpler to use than the existing js ui frameworks. Features like:
- not having to setup a build environment or wait for compilation
- no signals or other dance to setup my data
- class based components, where I could pass arguments to sub-components as constructor args
- scoped styles, two-way binding and other nice to haves.
- not having the limitations of shadow dom (Lit)
- Just be a library I can import anywhere, not be a whole framework.
I wasn't able to find anything that did all of the above. It has a score of 1.08 on the js-framework-benchmark, which is faster than just about every widely known competitor, and most of the faster ones have implementation note "penalties" for not conforming to the benchmark requirements.
I've used Solarite in production for a few years for an internal work project, but I could use more feedback on the API before I feel comfortable releasing version 1.0.
I created Solarite ( https://eric-frost.github.io/solarite/
) and use it everywhere to create complex app UI in the browser, so I'm invested in web components.
I think NOT using shadowdom is usually the solution for shared stylesheets. So many of my problems have been solved by just letting the styles cascade.
I also now use AI to build everything and I read less than 5% of the code it writes. I think web components still matter because AI still needs clean and organized code. It can brute force things the hard way, but organized code lets AI move faster with less tokens, less bugs, and less code shipped to the browser.
I assumed Solarite would be at a disadvantage because it's not widely known and AI's aren't trained much on it, but I've found that even the earlier models could use it well, and do so before I released it and before it could have been in any of their training data.
Yes, Solarite will take any children of your element and reparent them into a <slot> element if your component has one. Or just append them to the end if not.
Scoped styles hasn't been an issue for me, but I understand why a lot of people want them.
My own library wasn't designed with Web Components in mind, but I keep finding it useful for them and some of my "v2" project is expanding what is possible/easy with them. https://worldmaker.net/butterfloat/
It supports passing arguments via attributes to constructors. And you can pass complex arguments to nested components without serializing them. No signals and no build step either, just import and use on your regular data. And it's faster than just about all the others.
I've written something close to this called Solarite... that uses web components. There's no build step and no signals, but unlike your example, each instance is bundled together in a class, and you need to manually call render() when it's time to redraw. But I actually prefer having that control.
There are no signals, proxies, or decorators, or any compilation. You just use plain data. Though the trade-off is that you have to call render() yourself. I prefer it that way though.
That's new. I had tried several times and always got a response saying it was a conspiracy theory. The recent GLM-5.3-Flash also wouldn't give me the real details.
reply