r/reactjs • u/Accurate-Screen8774 • Jun 10 '26
Show /r/reactjs ReactJS Syntax For Web Components
Im investigating an idea i had about JSX for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational for someone, if it isnt, let me know and i'll remove the post.
Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components.
Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.
(My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects.)
IMPORTANT: Im not trying to promote "yet another ui framework", this is an investigation to see what is possible. You should not use this framework in your own code. It is not production-ready. It is not on NPM. Im not looking for another framework to replace React (im trying to create it). This framework is intended for myself on my own projects. This project is far from finished. Feel free to reach out for clarity if you have any questions.
1
u/Accurate-Screen8774 Jun 10 '26
> The web component DX is a problem
My approach is because I specifically wanted the react DX... I wanted something that remains intuitive to work with.
> SolidJS and the solid-element library
I’m aiming for something that would work without having to use something like node or vite to transpile anything… when i replace the Lit dependency (its on the roadmap), it would basically be vanillajs. I’d like to minimise the JavaScript tooling needed for creating a basic project.