← Back to context

Comment by azangru

18 hours ago

> Why do we code with React?

...is a loaded question, with a complex and nuanced answer. Especially when you continue:

> it's worth paying the React complexity/page-weight tax

All right; then why do we code in React when a smaller alternative, such as Preact, exists, which solves the same problem, but for a much lower page-weight tax?

Why do we code in React when a mechanism to synchronize data with tiny UI fragments through signals exists, as exemplified by Solid?

Why do people use React to code things where data doesn't even change, or changes so little that to sync it with the UI does not present any challenge whatsoever, such as blogs or landing pages?

I don't think the question 'why do we code with React?' has a simple and satisfactory answer anymore. I am sure marketing and educational practices play a large role in it.

Yeah, I share all of those questions.

My cynical answer is that most web developers who learned their craftsin the last decade learned frontend React-first, and a lot of them genuinely don't have experience working without it.

Which means hiring for a React team is easier. Which means learning React makes you more employable.

  • > most web developers who learned their craftsin the last decade learned frontend React-first, and a lot of them genuinely don't have experience working without it

    That's not cynical, that's the reality.

    I do a lot of interviews and mentor juniors, and I can 100% confirm that.

    And funny enough, React-only devs was a bigger problem 5 years ago.

    Today the problem is developers who can *only* use Next.js. A lot can't use Vite+React or plain React, or whatever.

    And about 50% of Ruby developers I interviewed from 2022-2024 were unable to code a FizzBuzz in Ruby without launching a whole Rails project.

    • >> a lot of them genuinely don't have experience working without [react]

      > Today the problem is developers who can only use Next.js. A lot can't use Vite+React or plain React, or whatever.

      Do you want to hire such developers?

      1 reply →

    • My test for FE is to write a floating menu in JSFiddle with only JS, CSS, and HTML. Bonus if no JS.

      If you can do that, then you can probably understand how everything else works.

      1 reply →

  • These people ganging up on you, felt really bad because I support your claim.

    Let me help you with a context where LLMs actually shine and is a blessing. I think it is also same with Karpathy who comes from research.

    In any research, replicating paper is wildy difficult task. It takes 6-24 months of dedicated work across an entire team to replicate a good research paper.

    Now, there is a reason why we want to do it. Sometimes the solution actually lies in the research. Most of research is experimental and garbage code anyway.

    For each of us working in research, LLM is blessing because of rapid prototyping it provides.

    Then there are research engineers whose role is to apply research to production code. We as research engineers really don't care about the popular library. As long as something does the job, we will just roll with it.

    The reason is simple because there is nothing out there that solved the problem.

    As we move further from research, the tools we build will find all sort of issues and we improve on them.

    Idk about what people think about webdev, but this has been my perspective in SWE in general.

    Most of the webdevs here who are coping with the fact that their react skill matters are quite delusional because they have never traversed the stack down to foundation. It doesn't matter how you render the document as long as you render it.

    Every abstraction originates from research and some small proof of concept. You might reinvent abstraction, but when the cost of reinventing it is essentially zero then you are stilfing your own learning because you are choosing to exploit vs choosing to explore.

    There is a balance and good engineers know it. Perhaps all of the people who ganged up on you never approached their work this way.