It’s a big question: Is React worth learning in 2023? According to the 2022 Stack Overflow Developer Survey, React.js remains the most wanted framework by employers. React is the world’s most popular JavaScript framework. But does its popularity make it worthwhile in 2023? I think React.js is still a great investment of your time and effort this year and for many years to come. Here, I will give several reasons why you should learn React.
React.js is extremely important in the developer job market
These days it is common knowledge that if you want a job as a web developer, you should learn React. For most large or medium-sized software companies and web agencies, React is their go-to framework thanks to the simple, intuitive syntax and high potential. React gives developers a mix of high development speed and efficient, intuitive code. So if your goal is to get a job, knowledge of React will help expand your employment options.
React apps are fast, efficient, and stable
React.js uses what’s called a Virtual DOM to manage state changes. This allows React to batch updates and determine the best way to pass those updates on to the real DOM. Since most web applications are constantly changing the state of many different components, all of those updates can be a real burden on the DOM. But with the Virtual DOM, you won’t have to worry about your app’s performance suffering from state updates.
React apps are also amazingly stable because the libraries used with it are well-tested and often used even inside large apps such as Facebook. (A good example of this is the Redux library for state management.) So dependency issues with React are rare.
React code is declarative, not imperative
Declarative code is what you write when you tell your program what to do and not how to do it. This makes your code way more readable, and more intuitive to write. React fully supports declarative code, which is most evident in its use of JSX syntax and Hooks. This also makes React one of the easiest JavaScript frameworks that you can learn.
For more information on React.js and coding in general, check out my YouTube channel.
Also, you can start reading my series of articles that will teach you all the basics of React.js. Start with my introduction to React! Or you can check out the video below:
Pros and Cons of React
While React is an amazing framework that is definitely worth learning, it certainly isn’t perfect. Any JavaScript framework is a complex, continually evolving system that has perks and flaws, just like anything else. Here are some of the major pros and cons of React.
Pros:
- React is a natural extension of JavaScript, and doesn’t feel alien and unfamiliar – it feels like “the right way” to develop web apps.
- React code is functional and declarative, meaning that readability is high. You often won’t even need to add comments because it’s very clear what your code is doing.
- The React community is enormous! There are more than 450,000 questions on Stack Overflow with the “reactjs” tag, so almost every question you may have has already been answered.
- React is in huge demand in the developer job market, so learning React is a great investment into your career. According to Glassdoor, the average React developer in the US earns $95,500 a year!
- React, especially when combined with a good state library like Redux, teaches you good software design practices. You’ll learn how to organize your components and how to set up an efficient data flow through your application.
- The React ecosystem has an endless supply of powerful and amazing libraries that can accomplish anything you can imagine! If you need to integrate a text-to-speech system into your app, there’s guaranteed to be a library that can handle it.
Cons:
- Meta (the company that developed React) like Google, has a habit of discontinuing products that didn’t meet their highest expectations. So it is possible, but not likely, that React could some day be scrapped. But even if this does happen, the React community is so large that it will probably enjoy continued support in the open-source space.
- In my experience developing with React, the framework seems to have a bit of a dependency problem. With many packages from NPM, it is often a bit of a gamble whether it will work perfectly with your app or not. (React Native is especially notorious for this.) When you are using a new package, you should be sure to thoroughly test it to make sure it works properly.
- As with many other frameworks, at times it may seem like you are never done learning React. This is because a modern web app uses many other libraries other than React to provide their functionality! You’ll find yourself finishing React only to start learning Redux, Redux Thunk, Styled Components, and maybe a bootstrapping library like Material-UI.