3 ms·
I briefly evaluated htmx with a go backend - and for simple navigation etc it works quite well. where I struggle is using more advanced web-components like date
by malteg 2y ago
I briefly evaluated htmx with a go backend - and for simple navigation etc it works quite well. where I struggle is using more advanced web-components like datepickers etc. - as I dont want reimplement it from scratch.
any advise from others how they handle complex client side components?
- yawaramin 2y agoMy current thought on this is to use Web Components but with a very simple server-rendered approach. Ie, render the custom element and all the markup it needs on the server, and have some JavaScript that loads the definition of the custom element so that it becomes interactive once rendered in the browser. I am planning to create some server-rendered custom elements in this style for my framework.
- maddalax 2y agoI'm the creator of https://htmgo.dev https://htmgo.dev and I'll say that is definitely the biggest issue I've run into with htmx. It's definitely not an overall replacement, you will have to either rebuilt the date picker from scratch in js, or find a vanilla js library so unfortunately the major downside I see so far is it's fairly hard to find good open source vanilla js libraries for things, as most things seem to be written for react. other examples include: - virtualized list - combobox
- malteg 2y agoIam using templ https://templ.guide/ https://templ.guide/ in combination with htmx. I rebuilded various of html components of https://www.patternfly.org/components/all-components/ https://www.patternfly.org/components/all-components/ - but as you mentioned, I also couldnt find good vanilla JS libraries for more complex components - and I dont feel I am capable to build a e.g. battle tested datepicker from scratch. How others handle this? P.S. I have seen some people using e.g. flowbite, but I havent tried it out: https://github.com/themesberg/flowbite/issues/812 https://github.com/themesberg/flowbite/issues/812