htmx
htmx copied to clipboard
Using htmx in Electron apps
Hi,
I should preface this by saying I have no idea what I'm doing, I could be way off the mark here with my question. I have neither used htmx nor Electron before, but I plan to start a project using both, so my question is, is it possible?
I know I could probably start a local webserver on the backend, pass the address and the port to the renderer with preload script and use htmx as advertised, but I'm curious if htmx can be made to communicate with the backend through other means than http (Electron's IPC in this case) whether out of the box or using an extension.
Any help would be greatly appreciated. Thanks in advance.
Hi! Yes, I've done this before and it's very silly but it's very possible. I highly recommend learning about Electron first before you attempt to integrate htmx; Electron is a massive beast and has a ton of weird things that you'll need to figure out first, otherwise you're just in for a world of pain.
That being said, here's my repo where I use HTMX for local navigation in an electron app: https://github.com/AlexandriaILS/Alexandria-Desktop
https://techdaily.info/goodbye-electron-hello-tauri-a-rust-powered-backend-framework Htmx + tauri, I think everything is possible, build webapp for any platform. Hi @asalahli, if you haven't started with Electron yet.
Hi there.
I don't see why htmx wouldn't work, but unfortunately I don't have any experience w/ electron.
Sorry about that!