10 comments

[ 3.5 ms ] story [ 36.8 ms ] thread
You might not need React for a simple app, but you will need data binding and doing it with jQuery is going to be hard.

If you want to avoid the complexity of React and making your own data bindings Svelte is the next big thing in the JS world. Maybe something will come along in 2025 and replace it though.

Although I think JQuery can easily be swapped for Vanilla JS, I totally agree with the React angle here. I've seen so much time wasted setting up tonnes of React boilerplate for a tiny single function website.

It's absolute madness the amount of time wasted on such things all for a fractionally more interactive page.

I mean, they don’t solve the same problems, so I’m not sure how useful this comparison is.

I know some people do have an irrational hatred of JQuery, but in my experience most people’s views are more along the lines of “sure, JQuery is great, but advances in vanilla JS and movement towards using React/Angular/whatever mean I just don’t need it any more”.

> anyone can learn jQuery. That’s where some of the snobbery comes from, but when you have a team that has all kinds of skill levels or you’re making something on a budget.

Anyone can learn React; I work in a group with a couple different teams, one of which is using Boostrap+jQuery and the other is using React+MaterialUI+Redux+... On both teams, most of the teams are new devs that came from desktop support or other non-dev IT roles. The ones doing React aren't lagging behind the jQuery team in ability to deliver, in fact they are leading.

(comment deleted)
The one thing I don't like which doesn't make sense on my part. If I need to make a change in React it is usually not easy because oft he different state(s) involved.

So if I have to add a new modal/modify the workflow, it's a process.

"I could just do it" it it was straight Dom manipulation and direct data handling but I get why that can be bad as well.

I am also not an expert but it could just be that I'm doing it poorly. For example cross communicating between components so I click on some button that had to rerender a parent group to show a modal inside or something, which again sounds like bad design. But that's what I've been "annoyed" with. Oh and the walls of warnings about useEffect or something not being mounted yet/apply change.

if you're seeing walls of warnings about useEffect, or having trouble adding a modal to your app, then you probably ARE doing it poorly, no offense intended.

It takes a while to really grok top-down data flow and how react components should be structured, but when you do it's magic.

As to useEffect, try not to use it. It's mainly for when you need to touch something completely outside the React tree.

That's interesting your point about useEffect. I mean I am using it because I'm using the functional way to build things vs. class. I'd prefer the class way honestly so I can just use the regular lifecycles eg. didMount/willMount/etc...

I did figure out how to fix the issues eg. prop depedency, but it is kind of annoying when anything inside the useEffect triggers the warnings.

Most recently I had a mobile app I had to make and it had a navbar/body/bottom navbar. I built the app split in three, so the navbar/bottom navbar took the routes to render what is shown, similar to the body... but this caused communication issues eg. you click on a thing in the bottom navbar, affects something in body and something renders/updates in the top navbar too.

yeah my architecting can use work I don't deny that. Generally though it's the whole "action causes re-render" that I'm not 100% with but again probably goes back to architecture.

Based on a hidden assumption:

> You don’t even need React: come on, I mean most of you are building simple disposable sites that won’t even be around in a year. Do you really need to build that brochure site in React?

That's like saying most of us are traveling short distances, and thus bikes are objectively better than cars. Bikes are nice, but sometimes I have to move furniture, Karen.