News for hackers. Stuff that matters.
Re:React 19 by klaussilveira on Thursday December 05, 2024 @02:49PM (#42331930)
Still no good component or UI libraries for HTMX.
Re:React 19 by clivestaples on Thursday December 05, 2024 @03:10PM (#42332179)
This is the sticking point for me. I get so many gains in Rails but I quickly sink into time-consuming component research/building. My eyes are always open for HTML/JS component libraries along the lines of react-aria.
Re:React 19 by Weetile on Thursday December 05, 2024 @04:42PM (#42333118)
I've had a great experience using Golang + HTMX + DaisyUI using the tailwind-cli-extra standalone tool, negating the requirement for npm at all.
Re:React 19 by nox101 on Thursday December 05, 2024 @04:45PM (#42333155)
Can webcomponents be trivially used with HTMX?

Like for example: https://shoelace.style/

Re:React 19 by klaussilveira on Thursday December 05, 2024 @05:51PM (#42333756)
Shoelace is great, but not robust. No data table, no date/time picker, no pagination, no sidebar.
Re:React 19 by alexpetros on Thursday December 05, 2024 @05:34PM (#42333609)
Anything that can be loaded as a stylesheet or a script tag works great with htmx. These are not htmx-branded libraries... because they're just web libraries.
Re:React 19 by klaussilveira on Thursday December 05, 2024 @05:53PM (#42333774)
Right, but then you are glueing things together and mixing and trying to match CSS so they all play together. AirDatepicker here, tomselect there, datatables here, popper there. All of sudden you lost a lot of time trying to make things look like one cohesive unit, when you should be doing your app.

Meanwhile, I have v0 generate the whole skeleton for me, with composable reusable components, and just got the API done.

Re:React 19 by neeleshs on Friday December 06, 2024 @11:24AM (#42341179)
Interestingly I did something similar with Claude, asking it to generate tailwind/HTML components instead. And copy/pasting them as Thymeleaf fragments for a java/springboot + htmx project.
Re:React 19 by yawaramin on Friday December 06, 2024 @06:13PM (#42345603)
Yeah maybe, if you are using all these ready-made components. But with htmx...maybe you won't need to. Maybe you'll just end up using basic HTML widgets and the result will be simple and fast.
Re:React 19 by mlboss on Thursday December 05, 2024 @05:49PM (#42333739)
That is exactly the point of HTMX. Use your backend stack and sprinkle some hx tags.
Re:React 19 by danpad on Friday December 06, 2024 @07:22AM (#42339136)
Excuse me - do you understand what a component library is? It's a whole framework from element wrappers, styling, animations to pre-made pages, filtering and sorting functions on tables etc. Think MUI, Bootstrap or PrimeNG.

HTMX is just "replace this with response", you'll still have to write all the CSS classes, manually add them to all the elements, do animations yourself etc. I like HTMX, but I am tired of backend and hobby programmers shilling it at every opportunity. Try to write a reasonably complex website with it and give it your friend to maintain and improve. You'll understand why frontend frameworks exist. HTMX sends you back to the HTML-in-PHP ages with homebrew ORMs and what not, because there's no unified way of doing things.

Re:React 19 by neeleshs on Friday December 06, 2024 @11:21AM (#42341153)
Then something like DaisyUI/HyperUI + HTMX? And depending on the backend you can do components (eg: For Django there is django-cotton and others that help).
Re:React 19 by danpad on Sunday December 08, 2024 @02:44PM (#42359777)
Yes, I could use those. But I gotta ask myself:

- will my client have problems finding someone that speaks Czech/Slovak and also knows DaisyUI/HyperUI/HTMX/Django? - are those techs gonna be maintained in 5 years? - what's the bus factor on the techs? Is it several people's project or a one (wo)man show?

All while there's React+<one of the big component libraries> right at your disposal...

Re:React 19 by yawaramin on Friday December 06, 2024 @06:10PM (#42345588)
Yes, there is a 'unified' way of doing things. In a single backend stack at least. And that way is...make a component library. Using your backend stack. It doesn't have to be HTML-in-PHP era. There are embedded HTML generation libraries for every mainstream language nowadays. You can just use whatever CSS you like and write any components you need. Eg I used Bulma, copy-pasted their HTML examples, and just wrapped them up as components.

If you are bemoaning the lack of prefab component libraries, well that's how backend development goes. Everybody and their dog has a backend stack and HTML generation system they like, and then eventually maybe some component libraries will emerge for the popular ones. That's the tradeoff for the freedom htmx gives you to work in any backend. You write some components yourself. Not the end of the world.

Re:React 19 by danpad on Sunday December 08, 2024 @02:16PM (#42359549)
Your first paragraph highlights the issue perfectly. You mentioned Bulma—how many developers have even heard of it, let alone use it regularly? It’s even worse when one app uses Bulma because someone wanted to try it out, another uses Tailwind because it came along a year later, and then there’s a 10-year-old PHP project still stuck on Bootstrap 3.

With something like MUI, everything is where I expect it to be. That consistency lets me focus on learning the business logic, addressing critical bugs, and thus making meaningful contributions.

Re:React 19 by yawaramin on Sunday December 08, 2024 @04:25PM (#42360640)
Sure, you use MUI, someone else uses Ant Design, yet another person uses Tailwind UI, where does it end?! Sheer insanity. So of course, this is a problem only when it happens in the server-driven approach, but not in the client-driven approach :shrug:
Re:React 19 by danpad on Sunday December 08, 2024 @04:40PM (#42360804)
Weeeeell debating whether to use one of those 3 UI component libraries you mentioned is IMO pointless, you are gonna be fine with any of them. I was thinking more along the lines of Django vs Rails vs ASP.NET and someone suddenly coming in and yelling "LET'S DO CLOJURE".
Re:React 19 by yawaramin on Monday December 09, 2024 @03:47PM (#42370403)
In that case someone is gonna come in and yell 'LET'S DO ELM WITH ELM-UI'? No?
Re:React 19 by danpad on Tuesday December 10, 2024 @02:55AM (#42374798)
True :D
Re:React 19 by xigurat on Friday December 06, 2024 @01:07PM (#42342345)
Probably there will never be, that's like saying "Still no good component or UI libraries for HTML".

HTMX philosophy is to be timeless and agnostic as HTML is, is just a nice extension on top.