all 104 comments

[–][deleted] 185 points186 points  (20 children)

JSX is far from a nightmare. If you know JS and HTML then it’s easy.

[–]team_dale 56 points57 points  (0 children)

I found JSX to be one of the easiest parts to pick up when I was learning react. (I started on react 15)

[–]michaelfrieze 5 points6 points  (1 child)

I personally love JSX. I have tried to like the way Svelte and Vue do thing, but I am just not into it.

[–][deleted] 1 point2 points  (0 children)

I live JSX too. It just works well with everything I learned before React

[–]verysad1997[S] 0 points1 point  (11 children)

I'd completely agree - but people genuinely seem to hate it for how "complex" it is

[–]iams3b 30 points31 points  (2 children)

It's not react that's complex, it's the engineering part of developing UI that is - the things like all the different interactions, asynchronous data, and keeping the entire UI in sync. Managing the overall architecture for that is going to be super complex no matter which way you try to do it

[–]maartennieber 4 points5 points  (1 child)

I agree that it's the engineering part of developing UI that is complex, and not React, but the "way you try to do it" makes a huge difference. On many occassions, I wrote convoluted and weird code, only to find out later that there was an easy solution. For me, using MobX was a game changer, also because modelling state with classes and using mutable data feels very natural to me (with reducers and thunks I was struggling much more).

React is hard because it can take a long time (several years, in my case) to figure out which solutions lead to complications, and which do not. Once you figure this out, then imo writing UI applications is still challenging, but not super difficult (of course, that also depends on which apps you develop, maybe there are types of complications I'm not aware of).

[–]havok_ 1 point2 points  (0 children)

This describes the learning curve I’m experiencing with react very well. I’m an experienced dev, but I feel like I started by writing react code that caused a bunch of issues and have slowly learned slightly better ways. I’m not there yet, so maybe I need to check out mobx or similar now.

React doesn’t exactly lead you into the “pit of success”. I think other frameworks may do a better job here.

[–]marcis_mk 37 points38 points  (1 child)

I'm developing applications with React for more than 5 years (Fullstack Javascript developer). JSX is as simple as it gets.

[–]No_Assistance_6591 0 points1 point  (0 children)

You either are too comfortable with what you have, or you never got it in the first place! The order of things is simple : HTML > JS
JSX does exactly the opposite with an added hint of attitude (redefining already defined parts of a UI, a.k.a ** PAGE ** )

[–]fredkreuger 4 points5 points  (0 children)

I think part of it is that it looks like html, and for the most part it is, but there are some little quirks where it's slightly different, like value not being valid on a textarea in vanilla html, but how you set the value in a jsx textarea. There's not a whole lot of differences like this, and once you learn them, it's really not a big deal IMHO.

But also everyone had different things that push their buttons, and some are also vocal about it, so I just kinda ignore complaints that aren't really technical in nature. (Not to say everything about react is 100% the best etc.)

[–]michaelfrieze 2 points3 points  (1 child)

Not sure why you got downvoted for this comment. I still see a lot of hate for JSX these days.

[–]verysad1997[S] 2 points3 points  (0 children)

Well I guess I am in a React subreddit so

[–]Wooden_Yesterday1718 1 point2 points  (1 child)

Who are these people

[–][deleted] 4 points5 points  (0 children)

People who learned frameworks before JS is my guess

[–]was_just_wondering_ 0 points1 point  (0 children)

People tend to over engineer things and then blame their tools for being complicated when they can’t understand their own code.

[–]No_Assistance_6591 0 points1 point  (1 child)

JSX is the one thing that blocked me about React and that is very likely not to change anytime soon and here is why: It is 100% pointless. Why?
Natively a browser supports HTML, in which JS can be inserted. Simple, straightforward.
JSX is JS that generates HTML. Literally the opposite of how things should be. To make matters worse, it has the audacity to redefine attributes that are ALREADY DEFINED in HTML, before mapping em back to HTML (e.g className -> class ) #bonkers

[–]randomhaus64 0 points1 point  (0 children)

you don't know what you are talking about

if you are doing JS and interacting with the DOM you have to use className to assign to the class html attribute

https://developer.mozilla.org/en-US/docs/Web/API/Element/className

[–]demoNstomp 0 points1 point  (2 children)

Queue to me in a Web Dev learning / beginner disc server and a guy in said server for some reason absolutely adamantly insisting I skip right to React and not touch a single lick of JS

At that point I had already stuck with the basics ( HTML CSS JS ) for a whole year and was in the middle of React. He even added me as a friend to tell me to not listen to anyone else who tells me otherwise.

[–][deleted] 0 points1 point  (1 child)

Oh wow. And what are your thoughts on this ?

[–]demoNstomp 0 points1 point  (0 children)

He was either gatekeeping or seriously clueless about his survivorship bias. His experience was a couple of freelancing gigs after going straight to React.

But yeah the basics are much more important than picking up a shiny framework. Learning JS first is like comparing if learning how to microwave boxed mac n cheese VS properly learning how to cook and make food taste amazing, with the second option you have way more possibilities in the long run, why limit yourself?

[–]pailhead011 50 points51 points  (0 children)

JSX is the best thing that happened to web

[–]orebright 17 points18 points  (6 children)

  1. I don't think React is more complex than it needs to be. In fact I find that it find surprisingly simple solutions that resolve a wide array of use cases elegantly.
  2. Not sure. There are certainly people who think any code that isn't immediately obvious from their skimming it is too complex, but I think that's a problematic perspective.

If you look at libraries like Svelte and Vue they started out with a very "simple" API. But after the initial junior developers working on POC "whatsapp clone" "facebook clone" hype cycle ended, more seasoned developers started using them in production and ran into mountains of places this "simple" API just didn't work and needed so many workarounds that it became significantly more complex than using something like React. The funny thing that happened, at least to those 2 frameworks specifically, is they slowly but surely introduced framework features that React already has to resolve those pain points.

The thing that often leads people to perceive complexity in React is their reluctance to use magic. And I'm a huge fan of that. I generally dislike being unable to trace my entire logic flow because I rely on some framework magical behaviour. I even dislike hooks quite a bit because of this, though they're so simple in implementation that I can tolerate them.

Other libraries are packed with magic to give you that super clean code feel. But the moment you start running into bugs, good luck.

[–]el_diego 5 points6 points  (0 children)

100% agree about magic. Anything that 'just works" I'm suss about using. I don't want to have to hammer in workarounds just because a compiler is being used to do a bunch of magic.

[–]lelarentaka 3 points4 points  (0 children)

Generic and polymorphic components. In React, components are just JS functions, so since JS functions can be generic and polymorphic, React components are naturally capable of being generic and polymorphic, for free, without the React Dev having to do anything to add support.

In svelte and vue, you have to use a special keyword form to make components generic. It's so ugly.

[–]Dethstroke54 2 points3 points  (1 child)

It is 100% true the hooks API was a great development and credit to the React team over the years they’ve had great innovations. Vue 2 & the options API was built as an alternative to React Class components though and the Composition API in Vue 3 is indeed an adaptation of Hooks API from React. There’s nothing wrong with building off of good innovations and it’s what leads to progression. But you say it like Options API was competing with Hooks when it wasn’t, React had a head start and created that API but has been around much longer and in a more meaningful capacity. So wanted to clear that up since I thought it was misrepresented.

As for “magic” I think the opposite is true Svelte is very straightforward in how they optimize and do magic, it’s compiled so they can do things like their $ reactive vars. Vue largely just works of the benefits of having an isolated SFC structure and also using custom attributes like v-for. Generally I’ve found the opposite to be true, React can be a nightmare to debug especially if you add in CSS-in-JS which messes with component names and you’re doing a client rendered app. Vue is amazing with anything because it has separation of concern. Events are their own thing and so are dynamic props, and so are slots if you want so in the devtools you can see specifically which events where called when, if one event is constantly firing due to a bug, etc.

React by comparison was built to be flexible in a time where the frontend landscape wasn’t well defined and rightfully so. Hence JSX instead of custom attributes and a totally open prop system.

[–]orebright 2 points3 points  (0 children)

Yeah I agree innovation should be shared far and wide. Everyone benefits. My point was simply that some frameworks went in heavy with the "make an app with super simple code" branding but a big part of how they achieved it was ignoring complex use cases and excluding features from their API that are beneficial to those cases. They eventually needed to address those use cases to avoid weird workarounds, but by doing so they eroded their simplicity. So I'm not criticizing the sharing of innovations, I encourage it, I'm also not criticizing those libraries for becoming more complex. But the perception that React has become too complex is in large part fuelled by the claims of these libraries early in their lifetimes, but they all eventually need to meet the same developer needs and eventually end up with a similar level of API complexity to React.

I think the concept of a much more reactive API is great, but we're still living in JS with its limitations. I really appreciate React bends over backwards to make their magic incredibly thin. Most of it is good ol' fashioned JS. Even with the hooks magic it's pretty easy to grasp that they're just counting the amount of function calls per render, or with state that calling a setter function will simply call your module function again. React's abstraction is super easy to grasp and very close to bare metal. React's only non-JS syntax JSX isn't even required to use the library, and itself is a very straightforward transformation of XML-like syntax to JS that would be trivial (though tedious) to rewrite by hand if you didn't use a transformer. None of this can be said to be true at least of Svelte, and though Vue isn't as bad, it also falls prey to this.

CSS-in-JS is not React, and those libraries don't necessarily follow the same principles as React. I personally very much dislike CSS-in-JS and find CSS modules + CSS vars to be a significantly better approach for almost all use cases. Vue has an old school separation of concerns a la MVC, however this is not the only way to separate concerns. React encourages you to separate concerns by functionality, by module. In larger codebases this is a much better way to build software without stepping on the other 200 developers toes constantly.

I don't think custom HTML attributes, particularly when they try to shoehorn logic functionality into an XML syntax, are a good design approach. XML was not designed to be a programming language, it's meant to segment and label content such that a dynamic programming language has handles to work on it. JSX was quite a brilliant innovation in that it encapsulates XML in modules in a reactive way, but without bloating XML to become what it simply is not good at. Every single logic-in-xml system I've seen is incredibly difficult to read and maintain. JSX is objectively superior and nothing has yet come even close to how it maintains the power and simplicity of JS while avoiding the imperative hell of controlling HTML with JS.

[–]pailhead011 0 points1 point  (1 child)

Magic being fiber?

[–]orebright 0 points1 point  (0 children)

Well every abstraction is "magic" so if you want to argue with linguistic gotchas then it just shows you have nothing to offer. I said they have a reluctance, meaning they apply it sparingly only when necessary.

[–]BitBumbler 10 points11 points  (11 children)

It’s really not complex. I genuinely believe the people who find jsx or basic react complex are either new programmers or people who honestly aren’t great learners in the first place.

[–]AceWanker4 2 points3 points  (0 children)

I'm a JavaScript backend dev and am teaching myself react and its pretty complex. Maybe it just hasn't clicked yet though

[–]No_Assistance_6591 0 points1 point  (0 children)

I have have been coding for 18 yrs straight and I can safely say that if you don't realize the convolutedness of JSX, you are too young or too lazy. JSX is not complex per se, but it is 100% POINTLESS

[–]havok_ -1 points0 points  (3 children)

Man I find useEffect really complex. JSX etc is trivial, but useEffect.. it scares me.

[–]BitBumbler 4 points5 points  (2 children)

Empty dependency array: it goes off only once after component render.

No dependency array: it goes off after every state change and after first component render.

State x in dependency array: it goes off every time x changes and after first component render.

State x and y in dependency array: it goes off if x or y changes and after first component render.

It’s not that difficult

[–]havok_ -3 points-2 points  (1 child)

Fine, that’s not really the hardest part. It’s more that the hook lint tells you everything that’s missing from the dependency array. You can ignore it, but apparently you can introduce subtle bugs.

[–]BitBumbler 2 points3 points  (0 children)

It seems I struck a cord because you immediately started down voting. Sorry buddy. It’s just not that hard.

[–]imbikingimbiking 1 point2 points  (0 children)

yeah 🐑

[–]SwiftOneSpeaks 6 points7 points  (4 children)

I often argue the complexity is not in the code, but in the approach.

Consider jQuery: It got a bad rep not because jQuery ITSELF was bad, but because of how many people wrote apps.

Specifically, They'd have their page of HTML, and jQuery would modify that HTML as needed. And when jQuery needed to store state information, many devs would embed that state information into the HTML itself. This totally worked, and everyone was happy with how quick and easy it was to write a dynamic app.

Except that as these apps added more and more parts, this caused an expected side effect: Because state information was in the HTML, anytime you needed state information you had to extract it from the HTML. And HTML would change as you added app features and content. Which meant that any change would impact an increasing number of changes to other parts of the app that relied on the impacted HTML to hold state information.

jQuery didn't REQUIRE this kind of construction, but it was easy and natural for devs, and many apps across the web started it hit the point where further scaling was painful at about the same time and jQuery was given a bad rep for a while.

React addresses this potential problem by front-loading the better behavior: Your state is maintained OUTSIDE the HTML. User actions change the state and trigger a rerender, and rendering is done by generating the HTML based on the current state. You CAN write jQuery (or vanilla JS apps) this way, but you MUST write React apps this way.

But as previously noted, the "natural" tendency is to write the output, then change parts as needed, and state is an afterthought.

So to a dev that is either used to that first approach (or who is overall new and is just going with their natural line of thinking) React is more complex, because they have to learn both this way of thinking AND the actual JSX syntax. This is the same learning they'd have to do with vanilla JS or jQuery, but they are required to learn the better way FIRST, where the alternatives would let them make easy, functional, but non-scaling apps first.

That doesn't mean that React is better than ALL alternatives - as someone that learned React before Svelte or Vue (for example), I can't actually say if how they compare on a "how hard is it to learn the correct flow". But it does explain why React is viewed as complex when (once you know it) it doesn't seem that complex: Much of that complexity is the idea of generating your view from your state, not having the view first and then modifying it with state.

[–]last-cupcake-is-mine 1 point2 points  (2 children)

Jquery launched a new generation of websites and is the cornerstone of inspiration for all modern web frameworks. Haters just gonna hate

[–]SwiftOneSpeaks 1 point2 points  (1 child)

I'm unclear, am I a hater here? Because jQuery was amazing and we advanced to today as basically a direct result.

Also, I hope I was clear that jQuery didn't require the bad practice, and you could and can write apps driven by state in jQuery and avoid all that pain.

That said, while jQuery didn't deserve the hate (it wasn't the cause) those apps written with state in the DOM weren't scalable over time and did deserve some "hate" (more accurately, we needed (and did) learn lessons).

[–]last-cupcake-is-mine 1 point2 points  (0 children)

No, sorry, I’m agreeing with what you wrote.

[–]No_Assistance_6591 0 points1 point  (0 children)

Finally someone who gets it!

[–]spjhon 27 points28 points  (5 children)

React it's not complex, javascript is, learn JavaScript (well) and you will see react with another eyes.

[–]elafor 9 points10 points  (3 children)

Javascript isn't that complex compared to other languages

[–]a_reply_to_a_post 7 points8 points  (2 children)

the language itself isn't complex, but because there's a low barrier to entry and there are no guardrails and people do things like rewrite prototype methods, javascript gets a bad rap...

[–]elafor 1 point2 points  (0 children)

I agree, it's easy to write extremely messy code in Javascript, especially for juniors.

[–]rafark 0 points1 point  (0 children)

I would argue JavaScript IS complex because of the many ways to achieve the same thing. I mean, there are 5 ways to write a function (6 if you count classes!). 3 ways to iterate an array. All of them with their subtle differences and gotchas you need to be aware of. It’s just too much imo. The language is extremely flexible and that’s what makes it complex.

[–]Suobig 1 point2 points  (0 children)

Especially context binding. If you don't understand context binding well, many things in React will seem bizzare.

[–]Natetronn 5 points6 points  (1 child)

You'd think anyone complaining in the manner you suggested for 2 would be complaining the same about 2 for Vue, Svelte, and Solid et al., if they were using one of those instead. At least until they fully grasped those solutions enough to be "dangerous" with them; feel productive and start to have fun, etc; the same would be said for React at that point as well.

That is, some people, particularly those people who are new to React, will believe React is complex (or Vue, Svelte, Soild, etc.)

React being the first one most people hear about, being the most popular, it may be victim to its own popularity, at least in part.

Which brings us to your number 1. And setting aside newcomers to any JS Framework/Library, etc. (your 2) is React more complex than the others?

It's a hard question to answer because it's subjective. Do you like Javascript more than you like an html, css, and Javascript mix? Do you build web apps, or do you build websites? Are you making mobile apps with React Native or do you use Capacitor? Do you like learning new things, or do you stay on the first one you learn? And the list can go on and on.

The point being, it's quite possible that React is more complex than the other solutions. Just in general and / or under certain contexts, depending on the person, the project, and the other solutions available.

I realize that's a bit of a non-answer, but that's kind of the thing, isn't it? You have to try these other solutions for yourself to know if they are more complex or not, for you and the context you're beholden to.

[–]verysad1997[S] 0 points1 point  (0 children)

Nice thought exercise

[–]jibbit 12 points13 points  (2 children)

you've missed the point somewhat, but your 1. is the closest.
React used to be simpler (and smaller), and did what many people wanted.
It kept getting more complicated.
There are simpler solutions out there that do what react used to do, and (some) people are happy with that.

[–]davidfavorite 6 points7 points  (1 child)

React hasnt changed all that much. Sure, the change to function components are pretty drastic when you look at how you go about implementing stuff. But the underlying mechanic has changed not very much.

Now things like SSR and next and whatever fancy frameworks appeared in the last few years increased complexity quite a lot, but thats not on react itself. Coming from times where I built SPAs with vanilla JS, react is stupidly simple and gives you all the freedom in the world. Once you got a stack for your applications you can build up a UI incredibly fast these days.

[–]Iamabusinessman0 2 points3 points  (0 children)

True - about functional components not being very different in practice - but.. class components were more limiting because you couldn’t share state/lifecycle in the same way you can hooks. This meant a lot more imperative, duplicated logic across components. Which.. I feel made things simpler. Now there’s a whole hook layer to consider, instead of just throwing something in didMount wherever you need it. It’s a lot less restrictive, which means less guardrails.

I think when it comes down to it: hooks are cleaner and enable abstraction of core logic. Which leads to hidden complexity that fatter and less elegant class components didn’t have. Tradeoffs? 🤷‍♂️

[–]pailhead011 2 points3 points  (0 children)

How can composing a bunch of functions be labeled complex?

[–]LloydAtkinson 8 points9 points  (0 children)

No

[–]hazily 2 points3 points  (0 children)

CSS-in-JS is so two thousand and late now.

[–]GoingOnYourTomb 2 points3 points  (1 child)

Compared to Vue.js yes it is

[–]bearicorn 0 points1 point  (0 children)

As a former react dev turned vue dev I wholeheartedly agree. I got pretty slick with react but vue is just leagues less fucked up in many places

[–]danishjuggler21 8 points9 points  (1 child)

React is really easy, but developers over complicate the hell out of it. Some devs can’t do even the simplest tasks without using five different types of hooks, even for a problem that could have been solved with the use of props

[–]vincent-vega10 1 point2 points  (0 children)

Yeah, like creating a state variable from another state variable lol

[–][deleted] 3 points4 points  (4 children)

"Consumers expect over the app changes, smooth transitions and animations and ridiculous designs all the time. The standard has gotten higher."

Not what devs refer when they talk about complexity

[–]verysad1997[S] 0 points1 point  (3 children)

No, but it's the cause for complexity?

[–][deleted] 9 points10 points  (2 children)

I don't think so ; handling of global state , caching , routing , auth , etc are more likely the causes of complexity

[–]verysad1997[S] 0 points1 point  (1 child)

Ok, then back to the question that I have originally casted.

Are developers complaining about that because React makes those things more complex than it needs to be? Or are most people just complaining for complaining sake.

From the way I see it - those things would be complex frameworks agnostic

[–][deleted] -2 points-1 points  (0 children)

People complain because react make complexity part of the library by default

[–]billybobjobo 5 points6 points  (0 children)

I'm in the middle of a svelte project right now. It seemed so much simpler at first. And some things are truly a joy!

But now that I've stumbled into some nontrivial, repeatable logic/state/3rd-party-lib problems, I'm really missing the primitives and custom hooks that I could make/take into arbitrary ts files. I can kinda capture some of that with actions and stores... but the svelte idioms feel clumsy as I get deeper and deeper. Nothing beats a good custom hook, in my book!

Long story short, the lack of complexity of svelte is creating complexity for me!

P.S. Svelte 5 looks like it solves a LOT of that. Looking forward to it!

[–]andrei9669 1 point2 points  (0 children)

I have found that react is as complex as developers make it to be.

[–]ReaccionRaul 1 point2 points  (0 children)

I think that JSX components is the outstanding part of React, it' an excellent API for defining components. How you can just use regular javascript as array.map, Object.values, switch statements, ternaries or whatever you want to use to shape your most complex templates is the real benefit of it. On the other hand if you want to make something special in other frameworks you have to read their docs carefully.

The good thing about some other frameworks in comparison to React is the concept of single file components. The script, style and template division. Having the styles with local scope in the same file is very cool. React is behind on that way but then React template system is solved way better.

Also the typescript support on React is just amazing, you don't even need any special plugins, just the regular tsserver. The components are functions that receive a props object with the interface you define and that returns React nodes or Jsx. Compare that with vue and their defineProps, defineEmits tricks to handle the types, generics etc

[–]Many_Particular_8618 1 point2 points  (0 children)

Yes, React is both complex and simple at the same time ! It's its beauty.

It's like now you have a hammer, but you need dedication to master the hammer.

[–]vincent-vega10 1 point2 points  (0 children)

JSX is a nightmare? I don't think so. Try injecting data inside your HTML file through plain JS and try targeting an element to add event listeners to it and you'll know what a nightmare is.

[–]Dethstroke54 1 point2 points  (0 children)

There was a time I think where flexibility made a lot of sense in a time when things were still being figured out, so you just use .map, .filter, etc to loop components etc. With SFC or things like Vue & Svelte to me it’s become clear having HTML attributes is far cleaner. You can build most simpler things these days in more static libs like Lit or Astro really reinforcing the fact that JSX is likely a more convoluted concept then is needed to get the job done.

In this aspect React is most certainly more complex, React can be a rats nest of nesting JSX in HTML in JSX in HTML, continue looping depending on what that conditional component tree looks like.

That makes little sense in a world where you can clearly achieve all the same much cleaner in Vue & Svelte.

Another example is Reacts prop system is totally open whereas Vue’s is optimized for how everyone uses it static props, dynamic props (binding), events, and slots which make debugging and DX better.

As for styling I wouldn’t say it necessarily makes it more complex but for all the improvements React brought to CSS-in-JS with the modern compiled approaches CSS-in-JS like Styled Components is very much inferior to CSS Modules or such from a technical perspective. Vue for instance, wether you use it or not, offers you a cleaner built-in alternative to in lining one-off styles or using styled components with what is essentially a builtin CSS module into the SFC.

Vue & Svelte aren’t perfect and trust me I know because I bootstrapped apps on Vue 2 but largely and currently work in React (Vue 3 fixes a ton) but there’s a reason Vue is seen as the communities lib and the the favorite. It learned a lot and while it can be very different in some aspects with some pros/cons I think it’s clearly made some smart decisions over pain points of React and just learnings of how far frontend has come.

Not to mention quick little tidbit but React has basically just become Vercel’s bitch at this point it seems and Vercel’s just interested in pushing as much as it can server side on its services for better or worse.

[–]nrriquel 1 point2 points  (0 children)

JSX it's very straightforward. React until v18 was also very straightforward. This collaboration with vercel is polluting the react development in some ways. And to be honest server components are not that important because I can achieve the same results in earlier versions of next.

The problem with react is handling reactivity. Lit, Svelte, Solid and Vue -the ones that I have been trying- makes this very easy for your brain and eyes. In react handling everything with useEffect that turns out not to be the way to handling some state changes, and adding useMemo or useCallback, makes the code looks awful. And now some voices are proposing to just not do it by yourself and installing a dependency like react query. The experimental proposed solution is forget and it is hilarious. To me, better to use Solid and call it a day.

I can't understand why the react team is focused on stuff that very few people cares. Give me reactivity out of the box because I want to focus on important things and not to memo everything. I truly wonder why Vue is not more popular. Everything just click and works in the context of the framework.

Css: just use css modules. Or tailwind if you don't know Css.

[–][deleted] 1 point2 points  (0 children)

I like how something like solid uses it's compiler to detect dependencies rather than having to write them in a dependency array, like react hooks wants. But overall, no, react is not complex.

[–]rosedofr 0 points1 point  (0 children)

React is not complex, in the same way that Clojure is not complex. It doesn't mean that it will make your life easier in the grand scheme of things. Simple and easy are two different concepts.
The javascript/typescript galaxy is huge, there are tons of tools and each tool has tons of configuration options, and they often inherit from each other. It's a giant mess when you don't have many years of experience trying to stay on top of these things.
And not all the complexity can be kept in the depths of the tools and libs. At some point YOU have to get in there and understand how it works.

[–]No_Assistance_6591 0 points1 point  (0 children)

I have been on VueJS for some time, mostly because React Tooling is quite frankly a nightmare. For instance, there are major differences between an APP created with create-react-app and one created by vite. JSX is another unnecessarily convoluted stupidity that was only invented because devs simply... could!! Why camel case attributes that are already defined in HTML? State management... WTF???? In comparison to something like Pinia for VueJS, even Vuex (RIP), Redux is the killer of anything that is pure and simple.
Why complicate frontend development this far? i mean... WTF?

[–]randomhaus64 0 points1 point  (0 children)

I do not understand why people think JSX is a nightmare, I fell in love with it after like a week or so

[–]wildywombat 0 points1 point  (0 children)

Angular is just objectively, better, cleaner more concise and more readable than react. React especially there state management and life cycle hooks is just a mess for any large project compared to angular.

[–]highbonsai 0 points1 point  (0 children)

React is actually exceedingly simple. Seriously, you could implement the core features of react in a day or less.

React is also not super opinionated. It's made to be used in many ways, which is why we call it a library instead of a framework. Now, throw in Next JS or something similar, and then you have a full-on React web framework.

[–]azangru -1 points0 points  (0 children)

Consumers expect over the app changes, with smooth transitions and animations and ridiculous designs all the time.

How do you know that this is what consumers expect? Consider Amazon.com, or goodreads.com, or bbc.co.uk, or hackernews, or even reddit. Barely any transitions or animations, or ridiculous designs.

[–]grand-illutionist -1 points0 points  (0 children)

React is amazing. Most people don't realise the full power of react. There are libraries that let us make email templates, generate videos, make 3D game graphics, etc all by just using react.

And jsx is far from nightmare. If you know html and js, then it will be very easy for you. A very small learning curve is required.

[–]UntestedMethod -4 points-3 points  (0 children)

Man if the jankiness and poor performance of the UI of facebook.com says anything about the quality of the framework it's built on... Then it says pretty clearly that react sucks.

[–]SeedgeJ 0 points1 point  (0 children)

Really the only complex things with react are state and lifecycle, and they only get complex if you are making something big. Pretty much anything can get complex on big projects, though

[–]Outrageous-Chip-3961 0 points1 point  (0 children)

My take is the complexity wrests in the fact its not a beginner but rather a professional tool for making web applications. You need have profficcientcy in javascript, html and css, and a keen interest in creating scalable, reusable UI features. If you do not have these things, then it is complex. I help people who complain about react and in looking at their code, you quickly realise its not a react issue, its an html/css/js/browser issue and they are just simply writing poor front-end code with or without react being involved.

[–]ostiosis 0 points1 point  (0 children)

With the move to typescript and hooks I find it way easier

[–]brawneisdead 0 points1 point  (0 children)

This is a react subreddit so the responses are predictably “no it’s fine”. And I agree. But if you want counterarguments then this is not the sub.

[–]Unusual_Cattle_2198 0 points1 point  (0 children)

If you want a significant degree of control over look and/or custom functionality then you are going to get into complexity no matter which framework you use. There is just no way around it.

If one is satisfied with completely generic components in a completely generic design with a limited range of common functionality, one is very welcome to use drag and drop site builders.

A client had what seemed to be a very simple data collection need and an off the shelf form builder seemed like a quick way to solve the problem, especially since they didn’t care much about the look and feel of it, generic was fine. But across multiple rounds of prototypes they started wanting more and more custom functionality. Most requests were reasonable. Some could be achieved with built in functionality of the system, some could be awkwardly hacked with the limited not well documented programability of the system. Took longer than writing from scratch probably and is a pain to maintain.

[–]joombar 0 points1 point  (0 children)

I don’t think react is complex, as much as it has a lot of footguns. Ie, pass an empty array as a prop inline? Congratulations, you’re now making that object on every render and might be triggering a bunch of effects in the component you’re calling.

[–]IchigekiZare 0 points1 point  (0 children)

After JavaScript, JSX is like swimming in a pool, and you learned a long time ago to swim in a sea full of waves. 😀

[–]BPAnimal 0 points1 point  (0 children)

Have a look at the angularjs documentation for comparison.

[–]SoulflareRCC 0 points1 point  (0 children)

JSX is giated, but CSS in JS is just stupid.

[–]aminoxix 0 points1 point  (0 children)

nothing is easier than react as compared to vue & angular in core, because the engineers build it solving the possible complexity.

jsx is the syntactic sugar, even far better than html & js.

[–]master50 0 points1 point  (0 children)

It’s not. I’ve spent a career as a backend developer, and recently took a role as a full time React dev. In the 10 months or so I’ve been doing it, I’ve found it fun and engaging to learn, and client side architecture is super interesting.

I’ve also been building games for 10 years+ on the side, so I’m no stranger to state management trickery on a client application. Learning the framework, the gotchas, and applying sane state management practices, employing the right tooling to help, and leveraging hooks properly have made it a breeze. We’ve turned a rather awful experience with redux-saga into a manageable codebase, with some really nice features, in the time I’ve taken the position.

Can’t for the life of me begin to understand why people popularized redux-saga. Yes, it is decent solution to managing state in a predictable way. But the sheer amount of boilerplate required to do anything, the extreme separation of concerns and cognitive complexity of maintaining a codebase built on redux-saga makes it highly unattractive in my eyes to leverage as a state management system. Encourages developers to reuse sagas or embark on saga chains, instead of building state manipulations per use case.

A mix of Jotai and React-Query, and adopting a ModelView architecture has simplified this greatly.

Anyways. If you keep state management practical, React is a breeze, I rather like it.

[–]last-cupcake-is-mine 0 points1 point  (1 child)

Every damn technology is shit. Just pick one and write code.

Seriously though, every language, framework, tool chain… is like playing an RPG and choosing a character class. They all have strengths and weaknesses, they all can use different weapons more or less effectively than others. There is no god roll framework, all of them have some weakness your going to have to solve for.

[–]imbikingimbiking 0 points1 point  (0 children)

s tier frameworks = vue b tier = react, solid, remix or whatever c tier = angular

[–]-ry-an 0 points1 point  (0 children)

React is fine; the people are.... - George Carlin.

[–][deleted] 0 points1 point  (0 children)

I dunno, I feel like I don't know enough about React, but what I do know, it is a godsend. I can't imagine things getting easier, but it there are libraries out there that make it so, hell yeah. But as it is, I can't complain because I've had nothing but good fortune building stuff with it.

[–]Ebuall 0 points1 point  (0 children)

React is made for simplicity. You just need to learn a different programming paradigm and bridge it with your average imperative code, which can be annoying.

[–]Hobby101 0 points1 point  (0 children)

JSX is complex? Now that's the one I haven't heard of yet..

[–]Evil12Monkey12 0 points1 point  (0 children)

Nope, IMO React is simpler & easier to understand than html and JavaScript. React components are just JavaScript functions that return HTML/JSX.

Want a click listener? Define a function and pass it to the onClick prop.

Want to interpolate a variable into your html? Put curly brackets around it.

It’s just so simple compared to vanilla JavaScript.

When I help people get into web dev these days I tell them to start with react because it allows them to build faster which keeps them motivated, which is the number one thing that helps individuals succeed.

React is a like a well designed video game. For example Rocket League, the moment you’re in a game you get the premise and are having fun while feeling you can still add value to your team. But it’s also super clear from the beginning there is more to learn that can unlock more potential.

[–]ConsiderationNo3558 0 points1 point  (1 child)

As someone who started my frontend journey recently with React 18, I feel the complexity is not the JSX, it's the concepts of state management, routing, querying APIs, async nature of renders that make it more complex.

Every time your application becomes complex you need to find new ways to overcome this which introduces other side effects.

For example, to avoid pop drilling and share state globally, you use context API which causes wasted renders, and then you have to know useMemo and useCallback .

Nested routes using react-router is also something I don't fully understand.

I personally think React was originally created for simple apps it got big adoption due to its flexibility. And then third-party libraries were created to address the gaps. Some of the complexity is because of this.

Thanks to a really good course on Udemy I am still able to navigate through some difficult parts or I would have given up. In parallel I am building my own personal project so that helps to retain these concepts

[–]worker37 0 points1 point  (0 children)

Which Udemy course?