Live data from Hacker News

Moving from React to htmx

htmx.org

101–110 of 326 posts

Re: Moving from React to htmx

#101
post #97

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

HTMX is much closer to 2006 web than React.

that's very true, it's an extension of HTML as a hypermedia, and you can achieve useful patterns with as few as one or two additional attributes (that are extremely symmetric with "normal" HTML).

a good example is lazy loading:

https://htmx.org/examples/lazy-load/

two plain HTML attributes that give you a nice tool for deferring expensive calculations so that users can get to interactive more quickly with the rest of the page

Re: Moving from React to htmx

#102

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

Well in this particular instance, their codebase size was reduced 67% and JS dependencies went down from 255 to 9 with TTI cut in half.

I'm not one to always chase the new shiny, but that's interesting enough to explore & I think does bring commercial value.

Last note: HTMX really feels much more like 2006-style web tech in philosophy which is a refreshing counter to all the current js complexity.

Re: Moving from React to htmx

#103

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

> How do I combat such burnout? What works for me: don't waste time with frameworks . The web standards are simple to learn and are also wonderfully not opinionated.

I dunno, I took this advice and ended up rolling my own thing that looked an awful lot like a framework, but wasn’t as good because the framework authors are better at JS than I am.

I’ve landed on Svelte+Typescript lately, and It’s Really Doing It For Me (tm). I think the trick is to find a framework or library that gets you, and just run with it.

Re: Moving from React to htmx

#104

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

Don't look at it. There's a million new things being invented and ignored every day but for some reason if it touches web dev it 1) gets a thread 2) gets upvoted and 3) you people are near the top of every comment thread.

Whatever led to you posting that you don't care about this rather than just not even noticing it like all the new things you see every single day that don't even penetrate your consciousness. Find and kill that.

Re: Moving from React to htmx

#105

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

Just use vanilla html/js/css. For most stuff that's fine. React is good for web applications that require reusable components and have a lot of state to manage, but if you are building a personal site just use vanilla.

Re: Moving from React to htmx

#106
post #67

Earlier quoted context omitted.

I think anywhere you introduce more complexity, more ways for things to interact, it's inherently less secure without the additional work checking for both the App + the API being secure on their own.

There's no such thing as a secure "app". Only the API needs to be secure. That's more straightforward when your API looks like REST/RPC calls rather than "renders html templates to a string".

It's more straight forward when you have multiple kinds of frontends (iOS, Android, Web app), but if it's just a Web App it's less complex to just return HTML.

The default today to make an API is because we assume it'll have multiple frontends or because we want to make it easier to change frontends. That does not make it more secure; it's just a trade off we, as an industry, have made to deal with the reality of delivering apps/services to users.

Re: Moving from React to htmx

#107

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

Just stick with web standards and life will be a lot simpler. All frameworks, including React, will eventually go by the wayside, but the standards will still be there. I've been building on standard Web Components exclusively since 2015 at multiple jobs and it has sustained a very successful career so far.

Re: Moving from React to htmx

#108
post #105

I'm just so burnt out with new things. How do I combat such burnout? I really don't care about 'Htmx', I think barely any apps need much beyond what was available in ~2006 in terms of web tech. I just feel tired knowing that moving from React to Htmx is an option. Yet another option which will very possibly bring zero commercial value (although it might be a nicer dev experience I guess) to any project I ever work on…

Just use vanilla html/js/css. For most stuff that's fine. React is good for web applications that require reusable components and have a lot of state to manage, but if you are building a personal site just use vanilla.

Vanilla JS definitely needs some discipline. I just made an app in vanilla JS for the first time in a while, and OMG it’s a rat’s nest XD

Re: Moving from React to htmx

#109
post #105

Earlier quoted context omitted.

Just use vanilla html/js/css. For most stuff that's fine. React is good for web applications that require reusable components and have a lot of state to manage, but if you are building a personal site just use vanilla.

Vanilla JS definitely needs some discipline. I just made an app in vanilla JS for the first time in a while, and OMG it’s a rat’s nest XD

I’m a fan of building with vanilla JS and I agree 100%.

It can be simpler, but it can get out of hand just as easily as any front end framework.

Re: Moving from React to htmx

#110
I am fortunate to have gone 10 years without having to use react in production ever.

I've used rails+turbolinks and included Vue or Stimulus or even jQuery to get on page interactivity done.

The current state of the react / jam world strikes me as an HR led solution where you can get humans who only know JS to be more productive without having to worry about servers, databases or infrastructure.

Post reply on HN