3 ms·
I feel I must mention that there exists a completely different approach to solving this problem, with HTMX or other "hypermedia" (let's keep all state on server
by vladstudio 3y ago
I feel I must mention that there exists a completely different approach to solving this problem, with HTMX or other "hypermedia" (let's keep all state on server) tools:
https://htmx.org/examples/active-search/ https://htmx.org/examples/active-search/
- IggleSniggle 3y agoI appreciate where this comment is coming from, and I love efforts to simplify and remove over-engineering, but htmx doesn’t really keep all state on the server, since once the data is displayed, you now have another holder of state (HTML). As soon as I started reading the docs on hx-sync and started imagining scenarios where that sort of functionality has been needed, I started thinking “man once the state gets this complex I’d really rather manage it in a proper programming language instead.” I think it’s often reasonable to consider the DOM the “database” of the frontend, but it can also be nice to have an intermediary representation to create the appropriate transition. Inversion of control, you might say.