Hacker News new | past | comments | ask | show | jobs | submit login

I had this thread https://news.ycombinator.com/item?id=40710782

But the thing gp suggested looks much better, at least here: https://github.com/danawoodman/bun-htmx (see src/components, they use react-dom/server renderer to template-render tsx (also note that “tsx” I’m using is not a file format, but `npm i -d tsx`)). I guess I can try that in node too.

That said, I don’t see the “quicker” part here tbh, imagining my mithril code in htmx templating code doesn’t make a big difference, unless I am missing something. It’s the same parametrized html but on server. Not even a glimpse of RAD-like paradigm shift.

I guess htmx looks better if you’re using react but never allowed yourself a thought that it’s a useless esoteric bullshit everyone agrees to out of fear of being ostracized, which htmx removes silently (and it’s server-side). Mithril is just a vdom-based templater with simple autoredraw and doesn’t implement esoteric bs already.

I somewhat agree with gp’s “unpack json” part, although it’s not a big deal with types shared across ends. I just re-new Date’s after fetch and that’s it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: