9 ms·
I think part of the reason why React causes negative reaction towards perceived "Javascript fatigue" is that Facebook introduced too much at once. There's no r
by antris 6y ago
I think part of the reason why React causes negative reaction towards perceived "Javascript fatigue" is that Facebook introduced too much at once.
There's no reason why JSX had to be included at the same time with React. There's no reason for it to provide classes, the whole bells and whistles.
They could have released just the Virtual DOM part of the library (which was the major innovation) and keep other parts of it to themselves or release them later. When React released with so many features at once, it looked on the surface like just another framework. In fact, people still call it a framework today, even though it isn't one and was never really meant to be one.
And the fact that React was released in a such a big package, it meant that people weren't eased into each of the concepts, one at a time. Suddenly you not only have to learn about Virtual DOM, but the class API, JSX at once. Some people even throw Redux at the junior programmer at the same time. Imagine having to learn so many concepts at once! No wonder it's hard to learn.
It's a pretty basic pedagogical concept. You have to introduce each concept in isolation and then build understanding of the whole from those parts. If you do not understand what the problem with vanilla DOM manipulation is, there's no rush to learn JSX and Redux!
I guess in the end I'm just glad you decided to play around with vanilla DOM manipulation and build from that, step by step. "Learn everything at once" doesn't work very well.
- TheRealPomax 6y agoGiven that they also released full and clear documentation _with_ a full and clear tutorial, I have to strongly disagree. They didn't release a library, they released a full framework and methodology that they had been using them selves already for writing huge web application UIs. Releasing it in tiny chunks would have made zero sense. Heck, it speaks to how well written their docs and tutorials were, and how easy it was to pick up, that it became this popular in the first place. After all: React isn't actually a web technology, it's a traditional OOP framework that happens to use the browser as its UI layer. Nothing it does respects how the real webstack works, and makes it impossible to debug "as a web page". Irrespective of how you feel about that part (because I love React as UI framework, but hate how we've told React devs that they're web dev, when they're very much not), the fact that it's stuck around and has become as popular as it now is speaks volumes to how much their release history was just fine.
- antris 6y agoI didn't mean to say that React is bad, quite the opposite! It's a wonderful library and for good reason. But I've never used the OOP parts of it, because I like structuring my applications without a framework, customized to the domain I'm working on. Several mutable classes as a basic structure of an application is a no-go for me. Luckily, you could, can (and in my opinion should) use React without those parts, and the library works just fine as a VDOM engine. Again, Facebook did an incredible job. I'm just commenting on why some people (not me) feel like React is "just another framework oh my god when does this stop". If they released the VDOM engine separately and the framework parts after that, people would understand that you can build your application in a way where you can pop out React and replace it with any other VDOM implementation. Most people don't seem to know this, and that's why they insist on calling it a framework. Also, JSX caused so much confusion among people who were used to template engines. There was a huge opposition to React as a whole simply because JSX looked weird when people were explicitly taught to never mix JS with HTML. React didn't need JSX to work. For my first applications I didn't use it because I didn't want an extra compilation step, and the build/packaging tools back then were quite painful when compared to those of today. I could use React perfectly fine and it did its job in pure JS. JSX to me was just syntactic sugar, but it became a huge red herring to people who were introduced to React.
- maclockard 6y agoA different way to think about this is that if Facebook had piecemeal released these new concepts it could have caused _more_ fatigue since it might have felt like an endless parade of new things. This is opposed to releasing it all at once, meaning you could sit down and learn the new things in one go, and apply that knowledge for some time before needing to learn anything else.
- tshaddox 6y agoI get your point, but there’s still plenty of web-related concerns that don’t go away when you’re using React. Many aspects of accessibility, layout and styling, browser compatibility, performance, security, and more are largely unchanged whether you’re developing a React web app or a static HTML+CSS site. Any time you encounter a website where the back button doesn’t work, or with a “link” that works when you click it but can’t be right-clicked to open in a new tab, that’s probably the work of a React dev who falsely believes they are not a web dev!
- quxpar 6y agoIn order to build the first airplane, you need to introduce a lot of concepts at once. The Wright brothers needed to build a custom engine just to get the weight-to-power ratio they needed, on top of understanding spruce wood fabrication, wing aerodynamics, propeller design, etc etc. If there was a logical midway point between the old jQuery-style paradigm and react, I suspect it would quite popular. However, all the react alternatives I've found make an equally large leap in terms of new concepts, because that's what makes the total development experience viable. Edit: typo
- dmitriid 6y ago> There's no reason why JSX had to be included at the same time with React. Why? JSX was one of the main reasons React became so popular. What would you have instead of JSX? > There's no reason for it to provide classes, the whole bells and whistles. They didn't provide "classes whole bells and whistles". React came out before classes where even standardised in Javascript. And its original API of `React.createClass` was really no different from hundreds of similar APIs. > When React released with so many features at once What? Which "so many features"? It released exactly that: a VDOM library with JSX and an API that was not much different from those on the market. That was the main reason it gained this much adoption: it was very simple, easy to understand and get into. > You have to introduce each concept in isolation and then build understanding of the whole from those parts. That... That what React does. It introduces major new things with major new versions.
- antris 6y ago> Why? JSX was one of the main reasons React became so popular. What would you have instead of JSX? JSX was also one of the main reasons why people opposed it at first. We were taught to never mix HTML and JS and put markup in a separate file. Of course separate template files as a concept were bad in the first place, but it served as a red herring for those learning. It "felt wrong" to many people who wanted to "just write Javascript". React works perfectly fine without JSX. I mean the syntactic sugar is nice, but the VDOM implementation was the breakthrough innovation that made React popular. You can have JSX if you want, but at the time of release, most people hated a new compilation step just for a bit of syntax comfort. > its original API of `React.createClass` was really no different from hundreds of similar APIs. Yes, this is the API that I am talking about. There was never a need to combine state handling into the first virtual DOM engine. If there are hundreds of similar APIs, why create another one? Why not let the developer choose their own favourite Class implementation? Some people (such as myself) try to distance themselves from OOP as much as possible, so the class API was quite worthless.
- sfvisser 6y ago> We were taught to never mix HTML and JS and put markup in a separate file. Yeah, but we were all still doing it anyways. Maybe not for our web pages, but definitely for our apps. I don’t think that part of react has ever been very controversial to people who were already building large webapps to begin with.
- mirthflat83 6y agoThis argument applies more to Angular 2 and them bundling rxjs with it. Learning React was a very pleasant experience
- pier25 6y agoI think the reason is rather that React forces you to write a lot of JS and learn many concepts vs something like Svelte. I also feel it has become more complicated now with hooks which, ironically, were supposed to make things simpler.
- nshung 6y agoThis. A lot of people get thrown into the top layer of the abstraction itself and then move down from there. What instead should happens first is that these people should be shown the problems React or other frameworks for that matter are trying to solve. It is way more motivating to gradually move up the abstraction layer when learning. Get the know the problem first and then find the solution to that problem. Not the other way around.
- Octoth0rpe 6y ago> There's no reason for it to provide classes I'm not sure I follow. ES classes predate react significantly IIRC. React may have been the first 'popular' library that made use of them extensively, but I don't think facebook should get credit for this one > There's no reason why JSX had to be included at the same time with React Without jsx, the value of react code is _much much_ lower IMO. I don't think it had any chance of catching on without it. >Some people even throw Redux at the junior programmer at the same time. Definitely agree that that is a mistake, but it also seems to be a mistake that people are long past. Not many people advocate redux these days, which I find unfortunate given how good redux toolkit makes it. That said, even without redux toolkit, it's definitely not something to throw at junior developers in their first week ...maybe week 3.
- acemarke 6y ago> ES classes predate react significantly IIRC No, React was announced in May of 2013, and ES6 wasn't finalized until a couple years later. > it's definitely not something to throw at junior developers in their first week FWIW, we specifically recommend that most folks should _not_ learn Redux until they're already comfortable with React. In fact, the new "Redux Essentials" [0] and "Redux Fundamentals" [1] core docs tutorials specifically say "we assume you know React already" as a prerequisite. (And yes, I really wish bootcamps didn't throw devs straight into Redux, but I understand why that happens. That's a large part of why I just rewrote our tutorials.) > Not many people advocate redux these days, which I find unfortunate given how good redux toolkit makes it. Appreciate the kind words :) [0] https://redux.js.org/tutorials/essentials/part-1-overview-concepts https://redux.js.org/tutorials/essentials/part-1-overview-co... [1] https://redux.js.org/tutorials/fundamentals/part-1-overview https://redux.js.org/tutorials/fundamentals/part-1-overview
- efdee 6y ago> I'm not sure I follow. ES classes predate react significantly IIRC. Before React started supporting ES classes, they had React.createClass instead. I assume that is what the poster is referring to.
- wilsonrocks 6y agoI use react all day and the thought of doing it without JSX chills me
- azangru 6y ago> I think part of the reason why React causes negative reaction towards perceived "Javascript fatigue" is that Facebook introduced too much at once. This could be relevant if this conversation were taking place in 2014; but it’s 2020 now. Today, the negative reactions to React are caused by: - it being on the heavier side of frameworks (given that some frameworks/libraries are below 10kB) - its relative slowness in benchmarks (absent concurrent mode), and the ease with which an inexperienced programmer can make it slower and more resource-hungry than it should be - its least compatibility with web components, compared to other frameworks - bad practices that have arisen in the community around it (using react when there's no need for it; serving large html payloads with SSR containing a stringified populated redux state, etc.)
- Aduket 6y agoYour english is so articulate. iss this your native language, which i dont think so? What is your native language and how did you get proficient in english? Thanks in advance.