3 ms·
Please don't use React unless the websites you're building would benefit from a reactive JS framework. You're going to have to maintain dependencies, likely rui
by kypro 2y ago
Please don't use React unless the websites you're building would benefit from a reactive JS framework. You're going to have to maintain dependencies, likely ruin your site's accessibility and end up writing code far more complicated than is needed given your requirements.
The reason you feel out of touch is probably because most people who learnt webdev over the last decade basically grew up on React and are now building everything with React without any thought. Unlike TypeScript which was widely adopted by web developers because it's superior to JS, React offers most projects nothing of value and is neither superior or a direct replacement for libraries like jQuery.
If you're building simple websites then you don't need a complicated stack. In fact, I'd even question why you feel the need to use jQuery in 2024... Keeping your stack as simple as possible is a good rule of thumb if you want to build things that require little maintenance and will be around for years to come.
If you're struggling to build the interactivity you need with jQuery, then perhaps look at React. But even then I'm not particularly keen on React as a first option myself. If you're a good JS dev and have good patterns in place you can build some very complicated stuff with Vanilla JS...
I'd also consider other frameworks. I've been doing web dev for about 20 years now and in recent years I've used React a lot, but I hate it. I find it's very easy to write ugly and poorly structured React code. Next.js tries to add some structure, but urgh, I find Next.js far too complex for most use cases and in many cases creates more problems then it solves. In my experience React projects need to have a great team of developers behind them to not end up a total mess within a couple of years.
I think Svelte and Alpine.js are generally better options for most smaller projects which require some reactivity. That's personally where I would look first.
The main reason I think you should move away from jQuery is simply that it's not useful anymore. Back when vanilla JS had limited functionality and poor cross browser support jQuery was amazing, but today it serves no real purpose.