by spion · 3y ago · 0 comments
Is there any material on successfully combining htmx with web components? It doesn't look to me like the original design takes this possibility into consideration...
(note: at a surface glance it doesn't look to me like components are in conflict with hypermedia - one could treat them as a side channel that "enhances" the standard set of elements)
My components look like this. The JS and CSS is included in the application's bundles. Ruby renders HTML on the server side.
app/components/breadcrumbs
- _breadcrumbs.scss
- breadcrumbs_component.rb
...
app/components/search_field
- _search_field.scss
- search_field_component.rb
- search_field.js
- selections.html.hamlIt's not really Web Components as specified, but iirc those are generally pretty much JS-dependent? But hypermedia's reliance on server side rendering means that you can just move this logic to the server.