In React’s short six-year lifespan, it’s seen an impressive rate of adoption. It now finds itself among the top software development technologies, alongside stalwarts like MySQL and jQuery. With all the attention, many teams find themselves asking the inevitable follow-up question: Should we consider using React? While there’s no single answer for every dev team, here are six primary reasons why React is definitely worth looking at.
Depending on your priorities, React’s flexibility can offer a huge advantage. It allows you to determine how you want to handle routing, testing and even folder structure. Beyond the environment, the fact that React isn’t too opinionated means it can be used on a host of different projects: web applications, static sites, mobile apps and even VR. It’s supported by all major browsers, including older versions of IE, and will continue to see broad support due to its affiliation with Facebook.
One other important aspect of React’s flexibility is its ability to be sprinkled into existing applications. Individual elements in a page can be replaced by React, until the entire application makes the transition. (This is actually how Facebook slowly moved from server-rendered PHP to client-side rendered React.)
React was created by Facebook in 2011, and open-sourced in 2013. Facebook currently uses more than 50,000 React components in production, so there’s no questioning the company’s commitment to the project. In fact, React is supported by a full-time staff of committed developers who blog regularly about the development process.
They also offer codemods to simplify the process of keeping code up to date. When a new version is released, these codemods give developers the ability to run a command line that automatically updates their code base.
React is in the top most starred repos on GitHub, and it’s downloaded more than 6.6 million times every week. But more important than the number of developers using React is the quality of their experience with the framework. In the 2019 State of JS survey, 72% of those who used React said they would use it again.
For those who need support, the chat community Reactiflux offers rapid feedback, not to mention the hundreds of thousands of React-related StackOverflow answers available to peruse. With an ecosystem that includes popular names like React Router, React Redux and MobX, the community is second to none.
While React isn’t necessarily the absolute fastest framework available, its use of a virtual DOM helps it benchmark quite well compared to the competition. This saves battery and CPU, and simplifies the programming model by re-rendering the screen when necessary.
React’s size is definitely one of its most appealing attributes. Weighing in at just 32k, (or just 3k in the form of Preact), it’s a great option for teams looking to minimize page load times and data use.
Since many of React’s components are pure functions, automated testing doesn’t require mocking or subbing. While UI tests usually require a browser, React allows the ability to run unit tests and memory via Node. Single React components tested in isolation are reliable and deterministic because they are pure functions.
Popular testing frameworks include Jest, Mocha and Jasmine, with Jest’s main advantage being its support by a full-time staff at Facebook and its bundling with Create React App.
As with any new technology, it’s always important to methodically weigh benefits versus drawbacks and consider how it will impact the existing tech stack. Here are some of React’s trade-offs:
- Because it's a library rather than a full framework, React requires more setup which can result in decision fatigue.
React trades being concise for being explicit. For example, two-way binding isn’t very common, so a change handler is required to keep things in sync. This results in more control, but also requires more code.
React is technically non-standard, so those who are committed to the standard will want to stick with Web Components. This leads to a whole list of its own trade-offs, but is worth considering.
Facebook’s corporate backing can be a positive or a negative, depending on your perspective. As was mentioned above, the benefits of this include dedicated staff and funding. But those wanting to steer clear of Facebook likely don’t appreciate their involvement.
As more teams weigh the benefits of React, many of them are deciding to make the jump. While there are some definite downsides to consider, the framework’s flexibility, support, and the overall experience make it tough to beat.
To get a deeper view of the pros and cons of React, you can watch Cory House’s recent webinar here.
5 keys to successful organizational design
How do you create an organization that is nimble, flexible and takes a fresh view of team structure? These are the keys to creating and maintaining a successful business that will last the test of time.Read more
Why your best tech talent quits
Your best developers and IT pros receive recruiting offers in their InMail and inboxes daily. Because the competition for the top tech talent is so fierce, how do you keep your best employees in house?Read more
Technology in 2025: Prepare your workforce
The key to surviving this new industrial revolution is leading it. That requires two key elements of agile businesses: awareness of disruptive technology and a plan to develop talent that can make the most of it.Read more