To use or not to use React?
I recently hired a developer to work on a web application I wrote in my spare time over the last two years. After having a look and pointing out several of the flaws, the developer suggested we rewrite the project using React. The web app currently relies on HTML, JavaScript, and CSS for the front-end. What are the pros and cons of using one versus the other? Is React preferable in any way to HTML, JavaScript, and CSS?
React is neither good nor bad, it is just another framework. Usually developers are keen to rewrite things in their current flavor where they are comfortable. You need to be detailed with them and understand what react is going to solve, because while it might solve some things it will bring with it a lot of baggage and complexity too which may or may not be good for your current app.
My general rule is newly hired team members can't rewrite systems or major components within their first few months on the team. Of course it isn't an unbreakable rule, but the goal is to make them fully understand the product and clients. A lot of times people want to rewrite things cause they don't understand the problem you are solving and by rewriting the code base they can dig into the problem more. When in reality if you force them to live with the existing codebase for a bit it can help them and you feel more comfortable with a rewrite if that becomes necessary and usually it goes better too.
I've seen devs use react for landing sites that are 3-5 pages and maybe a couple of forms etc all because they didn't know how to interact with forms through javascript. Or one I loved is a new dev saw jquery in a project we had that was still operational and doing great but he freaked out wanting to rewrite a stable cash cow of a codebase cause jquery is "bad". I doubt/hope that isn't your case here, but just make sure you feel confident in the reasoning and it isn't just cause they know react and it is the hammer they use regardless.
This is not an exact answer to your question, but if you run a "simple" website or web application and really want to move to react, choose an easy to use and maintain popular framework like Next.js and host it on a platform like Vercel or Netlify
It depends on a whole lot of things. Is your app generating revenue. Is the developer a full time employee. Are the changes you want the developer to do simple cosmetic changes. Is the largest part of the value in the front-end or is there some complex orchestration in the backend? I.e: has the product never existed for lack of good front-end and the value is precisely in the UI?
React is amazing. Throw in ESLint, typescript, and copilot and you will be shocked at how fast and beautifully things come together.
It doesn't sound like you know what React is. Let the developer do the job you hired them to do.
The web community has had another revolution and SPAs are now on the way out.
react will net you some marginal ada compliance ootb. youll get more complex ui components. depending on your current deployment process, you may also incur a significant new maintenance overhead
React made me 10 times faster, and I'm not exaggerating.