Edit: Angry is a better word.
Ask HN: Is there a sane alternative to Angular and React?
21–30 of 85 posts
Re: Ask HN: Is there a sane alternative to Angular and React?
#22The web is not desktop applications. The network is always there, the network is slow, the network is asynchronous. The network can fail. You cannot abstract over this with a clever library. Unless you don't care about pushing out 4mb of javascript before first render, you can't ignore it.
The front-end is not a server based application. It's relatively straightforward to just echo out some html from a server. This works pretty well, and conceptually it's easy. But the UI has events. Events are asynchronous. You cannot abstract over this. It cannot be ignored. Unless all you need is the off the shelf components and no custom interactions, animations or logic.
Every UI framework for the front end is aimed at solving a specific problem, a specific complexity. Before adopting ANY of them, you have to seriously ask yourself if you actually have that problem before just jumping on the bandwagon- in most cases, in my experience, you probably don't. But by adopting some "framework" you've just added a problem. you've added a complexity. If you had the problem, it might be worth it. You might have netted less complexity.
But probably not.
Browsers have come a long way in 10 years, if you haven't been paying attention. Most of the cross browser problems have disappeared unless you're using new things like web sockets, web rtc or indexedDB, or something crazy like that. The browser is already a UI framework with all the basic widgets, text layout, image manipulation, audio processing, etc. etc.
From a perspective of a user of your website or service, ask yourself what value something like react is really adding.
Re: Ask HN: Is there a sane alternative to Angular and React?
#23Don't reinvent a browser in the browser or waste more time on JS than you need to, you'll feel so clean separating things.
Re: Ask HN: Is there a sane alternative to Angular and React?
#24If you haven't yet you must look into Vuejs as well - https://vuejs.org/
Re: Ask HN: Is there a sane alternative to Angular and React?
#25Re: Ask HN: Is there a sane alternative to Angular and React?
#26Re: Ask HN: Is there a sane alternative to Angular and React?
#27Re: Ask HN: Is there a sane alternative to Angular and React?
#28> Angular and React seem to be a mish-mash of proprietary syntax and technologies (AtScript, JSX, TypeScript etc.) that paper over some of the cracks in JavaScript and CSS.
They are not "proprietary", but such they are partly an attempt to overcome "some of the cracks in JavaScript and CSS".
> Are these transitory technologies that will be replaced by something better in the near future?
I do not think so.
> Is there a better alternative available today?
As you mentioned JS (and to a lesser extend CSS) is the problem. A problem that Angular and React do not fix. People in this thread will mention Vue and Svelte as alternatives to Angular and React, but these also do not fix the underlying problem: JS.
TypeScript and Flow fix some of JS's problems. But a real next level approach that is available today is given by real compile-to-JS languages: Elm, PureScript and ReasonML.
It deserves to be mentioned these are all primarily "functional" languages. And not for no reason, FP is kind of the best option we have to avoid the OO/imperative-dramas we become tired of.
And Reason is particularly interesting as it can also compile to native (PureScript as well but not very mature in that regard), it is backed by Facebook (25% of messenger.com is ported to ReasonML already) and thus has well supported React bindings (allowing interop with the React ecosystem).
Re: Ask HN: Is there a sane alternative to Angular and React?
#29Re: Ask HN: Is there a sane alternative to Angular and React?
#30I note some people are mentioning other JavasScript frameworks (e.g. http://aurelia.io/ https://vuejs.org/ https://mithril.js.org/ https://choo.io/ https://svelte.technology/ ) They ALL have their merits, but it all comes down to the development community around them, and for me, the jobs out there.
Recently somebody asked in our local JS group what framework to learn and everyone responded with React. The jobs are there, the dev community is strong, and more importantly the learning curve is good, particularly with the hand holding create-react-app now does. Yes, down the line, you will have to learn react-router and maybe redux/mobx, but all in good time.