logoalt Hacker News

killerstormtoday at 11:03 AM2 repliesview on HN

Actually browsers already come with a minimal UI library. It's called HTML + CSS + JS.

There's actually no need to make any wrappers - you describe what you want in HTML and make it look good with CSS.

You only need to make UI using JS only for complex components.

Case study: I tried porting an old strategy game from pygame to web using codex. Codex decided that it doesn't need any library and raw-dogged HTML. It was able to match look and feel of an old UI with a very simple, maintenable code. Doing that with just CSS sounds kinda tedious to me, but it can be done, and honestly it looks more maintenable than any UI library.


Replies

gorgoyeltoday at 11:41 AM

The problem is really folks trying to one-size-fits-all web projects. React basically exists to give a “good enough” GUI toolkit functionality in the browser. On the other hand, the web was built to publish content as in articles and information. Everything kind of sits somewhere on the continuum between static content and the interactive app experience. At the extreme it can be interactive “art” piece.

It is important to consider digital media (as in art medium) best to convey an idea. And folks should start with HTML/CSS. Minimally, JS can be used for client-side validation. But that’s not necessary since the server needs to validate anyway.

show 1 reply
norman784today at 12:23 PM

For me, what the browser needs it's a good DX to build components, I kind of like Svelte and Vue in that regard, where your CSS, HTML and JS lives all together.

Writing a CSS file with the time will start growing and at some point will be very hard to know what to keep and what to delete, I think this is the reason why tailwind became popular, because it keep only the used rules, now the downside is that now your html elements has ton of classes.