skip to main content

Connor Ward

React is king (and that’s not changing anytime soon)

react logo with crown and sceptre

React is a Javascript library used to build user interfaces. Originally developed by Facebook, the library was open-sourced in 2013. If you’ve used the internet, you’re almost guaranteed to have encountered it; Facebook, Instagram, Netflix, Whatsapp, Dropbox, Atlassian – the list of popular companies using it goes on and on. 

It seems unstoppable. Many developers, particularly those who’ve been in the industry a long time, have heard this all before, though. Before React, there was Angular and before that, there was jQuery – all frameworks that have fallen by the wayside. It’s just a matter of time before something comes along and takes the mantle as the new hotness. Or so they say.

I’m not so sure. In fact, I think React will be with us for many years to come. Just take a look at this data from the State of JS survey.

Graph showing developers opinions of React.

Only 16.3% of respondents said they were not interested in learning or using React. Compare that with Vue.js (the only real competitor at the moment) where 32.3% of respondents said they were not interested in learning or using the framework. 

So why is React so popular? I believe part of the reason is because of how adaptable it has become. It started as a framework for building single-page web applications, but over time, an ecosystem of supporting technologies has evolved around it, expanding it’s potential. Now, a developer who learns React can not only build web apps, but also native mobile apps (with React Native) or websites (using JAMstack, Gatsby and Next.js).

What is React Native?

React Native, released in 2015, is a version of the framework that can be used to create applications for iOS and Android-based devices.

This provides developers with the best of both worlds. They get the flexibility and simplicity of building with a well known Javascript library, without giving up the power and direct access of native code. It powers popular apps such as Skype, Uber Eats, Coinbase and Salesforce.

Writing React Native isn’t quite the same as writing normal React. When publishing a React Native app, UI components for iOS and Android are generated from a background Javascript thread. In plain English; the final product isn’t actually using React code – so no HTML or CSS – it’s all being translated into code native to the device that the app is running on.

A person uses the Lightning API platform on their mobile phone

Although, not everyone is a fan. In 2018, Airbnb famously announced that it was sunsetting React Native in favour of pure native frameworks.

What is Next.js?

Next.js is a framework for React. Yes, a framework for a framework ?

It’s quickly taken the world by storm, clocking 60k stars on Github within just 4 years. Indeed, we think it’s poised to become even more popular in 2021.

This acclaim stems from the fact that Next.js fixes many of the perceived flaws in React. As a Javascript framework, it’s possible to argue that React suffers from several problems that are endemic when relying on Javascript to build digital products and web apps; namely, long load times, poor search engine optimisation and potential security issues.

Next.js does away with all these by bringing static and service side rendering to the party. You can use it to build lightning-fast JAMstack websites (though, these can have their own issues), or secure, server-rendered online applications. You can even build a basic API using the Next server, blurring the lines between front-end and back-end development.

Will React’s dominance last?

The feature set of React and it’s associated frameworks are vast. Yet, not everyone is a fan. Vue.js, a Javascript framework with similar applications has 172k stars on Github – 8k more than React. Nuxt.js, a framework for Vue similar to Next.js, sits at 33k. While you’re not quite as likely to encounter Vue in the wild (because React dominates amongst the world’s most popular apps), Vue is certainly popular with a growing number of vocal developers.

At the same time, a growing minority of developers are turning against Javascript driven applications altogether. David Heinemeier Hansson, the CTO of Basecamp and creator of Ruby on Rails, is a vocal campaigner against single-page applications and has recently released Hotwire, which he describes as “an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire.”

But can you build a mobile app in Vue? Not really. Can you build a mobile app in HTML? Kinda. Will any of this impact React? No. The applications of React are too vast for any of these individual developments to make a dent in its inexorable rise. Plus, my career is too invested in it at this stage anyway.