Live data from Hacker News

For all React coders out there, why and how?

news.ycombinator.com

1–10 of 13 posts

For all React coders out there, why and how?

#1
How do you guys constantly write React, let alone learning it? And why?

I am trying to learn it for two days (probably 12 hours by the time I write it) and... everything about it is pure annoyance that is shaped into a form of language.

Help from google? Nah fam it is outdated and not documented in official documentation.

Need sensible errors? .........fuck off.

Syntax? My eyes are burning.

Writing efficiency? You can write that code in 10 minutes, if you dont include the up-to-date package search on Google for 1.30 hours straight.

I will wait for many many years more for a language alternative to Javascript so I dont have to deal with this abomination. For whoever dealing with this and making life from it, how you all manage to keep your mental stability in balance?

Re: For all React coders out there, why and how?

#2
Real talk, the whole modern javascript ES7,8,whatever is to blame for the whole confusion imo. But all these modern javascript frameworks (angular, etc.) is designed to change browser state without triggering calls to the server (outside of async). That's extremely popular right now because the more your site lags, and lags behind the competition, the more market share you lose. So that's the whole economic reason behind why these frameworks are popular in a nutshell. look at everything from a business perspective.

Re: For all React coders out there, why and how?

#3

Real talk, the whole modern javascript ES7,8,whatever is to blame for the whole confusion imo. But all these modern javascript frameworks (angular, etc.) is designed to change browser state without triggering calls to the server (outside of async). That's extremely popular right now because the more your site lags, and lags behind the competition, the more market share you lose. So that's the whole economic reason be…

Everything from a business perspective always sounds non-sense to me.

I cant even find a library or language to code front-end, like I am burning my time since six days to find something that is dev-friendly. Everything is just, is it secure or fast? yeah ship it, we dont care about how developers feel about it.

really sad.

Re: For all React coders out there, why and how?

#6
React very quickly turned into an over-complicated mess. The basic premise of "specify how the DOM should represent the data/look based on the state of the data, and when you update the data, the DOM will automatically update" is sound and was very useful. But all this stuff about hooks, and all the stuff with Redux that got very popular, was totally unnecessary. It's now a pain to perform the simple task of fetching data from an API and rendering it compared to the jQuery days.

That being said, I think your post is over-dramatic. Simple React apps for learning purposes shouldn't be too difficult or crazy. You may be overindulging in grouchiness and not giving it a chance.

Personally, I want to try something more minimalist like mithril.js at some point. I have heard good things about Svelte. It looks weird to me, but willing to give it a try.

Re: For all React coders out there, why and how?

#7
I hope I’m not hijacking this thread, but if anyone knows what is the best way to start a react app (web) in 2022, can you share?

I build in angular but looking to switch to react since it’s more popular and I find it confusing what libraries to use and patterns to follow. Eg: class based or functional components

Re: For all React coders out there, why and how?

#8
post #7

I hope I’m not hijacking this thread, but if anyone knows what is the best way to start a react app (web) in 2022, can you share? I build in angular but looking to switch to react since it’s more popular and I find it confusing what libraries to use and patterns to follow. Eg: class based or functional components

The tutorials at the react home page should suit you well.

Re: For all React coders out there, why and how?

#9
It was fine. But when it became too popular, just like trying to search anything about other popular languages like Python, the signal to noise of SEO spam makes it hard to find the good, relevant, and up-to-DAT info. As it got mainstreamed, things like JSX got mainstreamed too despite it adding way more complexity with a veneer of familarity.

Re: For all React coders out there, why and how?

#10
If you're learning React, you shouldn't let yourself get bogged down all the JS toolings, build tools, etc. It can all be quite overwhelming, and the best way to learn a new topic it to learn it in isolation before bringing those concepts into the big picture.

You can get started with this right away, simply type `react.new` into any browser and it will bring up a brand new, ready to go codesandbox in which you can write code, see your changes update live, save your drafts, and eventually download your code and run it direct on your machine. Even as an experienced React dev, I still spin these up all the time for little experiments and proofs.

Once you're ready to actually build a website, you'll probably want to start with an established framework like NextJS[0].

0: https://nextjs.org/docs

Post reply on HN