For all React coders out there, why and how?
11–13 of 13 posts
Re: For all React coders out there, why and how?
#12I personally don’t anymore, and currently struggling to leave frontend development all together somewhere else (thinking of Golang). As other commenters have mentioned, React.js development wasn’t that complicated when it first was introduced to the public.
Re: For all React coders out there, why and how?
#13Worse: the benefits of thinking that way are not really visible with small programs. Anything you can do in the "hello, world" range will seem harder than doing it in a conventional way.
Worst: React has gone through several substantial revisions, leaving a confused mishmash on Stackoverflow. The new ways are genuinely better, and the first few iterations were kind of a travesty.
Having gone through that pain, I find React very natural. It aims to be side-effect-free, which substantially aids debugging -- the bigger the program, the harder it is to figure out where some side effect occurred.
JSX seems to strike the right balance between HTML and code. A program "is" a web page... except when you need to escape out to Javascript, and you do that with a simple {}. That maps to how I think of a web page. (In fact, JSX is not HTML; you don't need React to write JSX and you don't need JSX to write React. And the differences can be genuinely maddening. But the lie of "It's HTML with some JS" is good enough for most days, especially when you jut start.)
There remain plenty of things to criticize about React, but when you just get started with it, most of the pain you experience will be shifting to its mindset. You'll be tempted to do things in the conventional way, and that's not going to work. It does actually become very fast to develop in because it reduces certain kinds of errors that require a lot of discipline to avoid in conventional DOM manipulation.