React - When Should I Use It?
Since I've been learning React, it seems like companies everywhere are using it. Job postings left and right have a wide variety of back-end frameworks, with a React front-end. I think Blazor and ASP.NET are great, but React seems to be the more popular font-end tool (at least here in Utah). I figured I could compile a few of the reasons why I would want to work in React, and why I would want to avoid React. Keep in mind, most of this is my opinion based on my experience and a new developer.
The Good
React is widely used; Facebook built and maintains it, so there is guaranteed support until Facebook goes down, and even then there is a large enough community that it would still last at least a while longer. On top of that, React's ability to efficiently update the DOM gives it better performance than tools like Django. React apps feel responsive, and it shows in the developer experience. It doesn't have a lot of documentation you need to remember, and the responsiveness offers a quick feedback loop.
Programming in React feels natural, my biggest issue when working in .NET is that there are a lot of black-boxes that we throw our code into. EFCore and ASP can be pretty confusing when you're learning, but React doesn't have hardly anything in it that you don't add yourself. I think the best part about React is probably the components, which are even better now with React hooks. Your whole project can be broken into isolated components that won't break each other if something goes wrong.
The Bad
Libraries, libraries, libraries. Many React projects (all npm projects really) end up depending on dozens of libraries, all of which need to be managed to ensure there are no version conflicts or other errors. On top of that, there might be several ways to do the same thing, and that results in a lot of decisions you need to make as soon as you start your project. This freedom is a benefit in some ways, and a downside in other ways.
One of the issues I found while working on my React projects was that online documentation can be all over the place. Some docs are old, and outdated, while others relate to any of the dozens of React technologies (React Native, React Redux, etc.). It takes a little more patience and specificity to find answers to your questions.
The Ugly
JavaScript. JavaScript is ugly, it's wonky and weird. TypeScript is better, so it's great that React supports it, but if I never had to code in JavaScript again I would be quite happy.
Comments
Post a Comment