3 ms·
We use django + react. I've long been curious about HTMX but one thing has been holding me back that I'm trying to get others' opinion on: the npm ecosystem is
by dopeboy 5y ago
We use django + react. I've long been curious about HTMX but one thing has been holding me back that I'm trying to get others' opinion on: the npm ecosystem is incredibly rich. I'm thinking of drop in components like maps, UI libs, etc.
Don't I need to spend a lot more effort using their original JS incantations and integrating that w/HTMX?
- kareemm 5y agoIt obvs depends on what you're trying to do. In general we aim to use well documented, well maintained, and popular dependencies if we take them on at all. We haven't run into any issues where it felt like we were doing more work than necessary to get HTMX up and running.
- brtkdotse 5y agoBy pulling in React you're now on the hook for another tooling+build pipeline for JavaScript. HTMX is a single JavaScript import meaning you can forgo the whole js tooling, which in my book is a _massive_ win.
- felipeccastro 5y agoI've been wanting to do this switch too and have the same concern. One option worth investigating is Shoelace - https://shoelace.style/ https://shoelace.style/, a library of nice looking web components that you can just add to your page without setting up a whole build pipeline.
- digisign 5y agoNot certain, but should be easy to make a new folder, fire up the django tutorial, and drop in htmx and shoelace from their cdn links into the main template to start experimenting. Looks feasible.
- tomwojcik 5y agoI agree npm is wonderful and if you need npm just stick to React but you mentioned UI libraries. I use Django + HTMX stack in side projects. I've been using Material UI with React before, but I don't see a need for something similar in Django + HTMX stack. Just add some css like bulma and you're done.