(no title)
db-interface | 2 years ago
My main takeaways have been:
- It mostly just works and simplifies things, but:
- Working with page state (in my case, which sheet is loaded) in individual requests (like updating a cell) is a bit awkward -- you can either supply it via `hx-vals` or via setting a global hidden input which is specified via `hx-include`. I ended up going with the second approach due to https://github.com/bigskysoftware/htmx/issues/1119 but it's not perfect -- in particular you need to duplicate specifying the input if you want to include additional inputs for some node.
- Error handling is also a bit awkward, but it's not too bad once you get used to the idea that you should return HTML elements in 400s. I found https://htmx.org/extensions/response-targets/ helpful as well. - Often HTML structure doesn't allow you to limit your request scope as much as you'd like. For me the big thing is I can't just replace one column since tables are row-major -- I have to replace the whole table if a column is modified.
No comments yet.