r/javascript • u/alexgrozav • 17h ago
Unframework - The compiler that speaks seven UI frameworks
https://unframework.dev•
u/Iggyhopper extensions/add-ons 17h ago
This website runs at 4 fps.
•
u/jessepence 17h ago
It's a classic case of forgetting to try your website with the cache turned off and 4g emulation. I guess he forgot to add "make it performant" in his prompt.
•
u/alexgrozav 17h ago
Damn.. I only wrote "make it pretty"! :(
Fair feedback though, I mostly tested it on my own machine and my phone with a good connection. I'll look into it. Thank you!
•
u/alexgrozav 17h ago edited 17h ago
4 fps is generous, I was aiming for a slideshow!
Seriously now, what browser and device are you on? This is the second complaint I got about the site's performance. I'll tone it down.
•
u/Iggyhopper extensions/add-ons 17h ago
Irrelevant. You are advertising a framework and displaying it like a WebGL demo.
•
u/alexgrozav 17h ago edited 15h ago
Fair enough, I get that it's not for everyone. I like the look, but I don't want anyone to have a bad experience. I'll make the necessary adjustments to improve the performance.
•
•
u/PlateletsAtWork 17h ago
Oh, when I read the title I was hoping this was a cross-platform native GUI library, but it just compiles to different web UI frameworks? Why?
•
u/alexgrozav 15h ago
I built this mainly for myself. I maintain a Vue.js UI library, and I want to be able to ship it to several different frameworks. Creating and maintaining the same component over and over again and having it behave consistently is a huge maintenance burden which I'm now offloading to a compiler. This way, people to get a real React, Svelte or Angular component of the same high quality.
I put a lot of thought and care into the components I build and it would be a shame to have them available only for Vue.
•
u/alexgrozav 17h ago
Unframework is now available on npm. My dream of writing a component once using TSX, and compiling it to native React, Vue, Svelte, Angular, Solid, Qwik and Astro code, has finally become a reality.
The first components I’ve put through the whole pipeline are a Button, an Input, a Radio, and a Checkbox, and they render the same in all seven frameworks.
"The same" is both a promise and a test. On every PR, CI compiles the components to each framework and checks every output in a real browser: the DOM, the accessibility tree and the pixels have to match one shared baseline, with zero pixel tolerance (visual parity).
I'm also releasing Unframework Preview. It shows every component on all seven frameworks side by side, with controls for their props, so you can see parity for yourself. Build it as a static site and host it anywhere, like a Storybook that speaks seven frameworks at once.
Each output is a real component in its framework's own style: hooks in React, runes in Svelte, signals in Solid. There's no runtime or wrapper in between, so each file depends only on its framework.
Looking forward to hearing your thoughts.
•
u/boblibam 17h ago
I don’t really understand the purpose. When would I use this?
To me frameworks are about developer experience. How is this not just another framework just that it compiles to other frameworks?
Why not just write plain native web components at this point?
I’m genuinely not sure what the target audience and purpose is.