by max_ · 3y ago · 0 comments
I am yet to find a reason for using frameworks like React instead of HTMX.
This is patently false. It is being used in multiple significant production systems:
and many more. There are times where htmx isn't the right choice, but the idea that its not useful for anything more than a hobby project is simply false.
HTMX tries to reduce the complexity.
>You have to return the html object from API which has its own set of problems.
If you mean that HTMX can't consume JSON. Can't you just create a separate end point for JSON responses?
React will require you to hire a React dev to handle all the complexity.
htmx will be mastered by your "back-end" devs (who actually are web devs) in less than a week.
This thing (and others like Vue, let me be clear) adds many layers of complexity over the web platform (client-side routing, data fetching, state management, rendering, etc.) and many third-party JS libs that you have to constantly update. You just can't say that it's standard/base web development.
Throw in the usual pile of libraries used with any larger react app and it can easily take months to really get moving.
- No complex build set-up (just link the script & use it)
- Less congitive load when reading the code. Especially if it's not yours.
- Very decent learning curve.
so "just shifts it somewhere else" might be underselling it a little