React.js framework it’s a tool to build UIs – a JavaScript library for building user interfaces. Some software engineers prefer not to call it a “framework” since it gives the developers much more freedom than Angular or Vue.
Just like Angular is supported by Google, React.js is maintained by Facebook and a community of developers. Both are open source and free to use under the MIT license. React.js is only six years old, which makes it a relatively new technology. However, it matured very quickly.
With JavaScript, you can build dynamic applications where the browser performs a substantial part of functions, so they can work without contacting the server. It also allows the data and interface to be updated independently in just a part of an app (without reloading it).
React is a tool to build both UI components and whole UIs – everything that concerns putting together visual elements, binding data to those elements, and specifying the logic governing it.
React.js can be used to create user interfaces in JavaScript for different platforms. You can use ReactDOM for web applications, React Native for mobile app development (sharing the majority of code between Android and iOS), and cross-platform hybrid desktop applications with Electron. Recently, Microsoft has also released React Native for Windows.
React.js is a frontend technology, but it can also be executed on the backend (server-rendered) and used for desktop apps.
There are two possible approaches to using modern JavaScript frameworks – client-side rendering, where the browser downloads the code and renders the UI, or server-side rendering, where the UI is rendered on the backend.
The difference between JavaScript solutions (such as React.js) and older technologies is that JS takes over much more of the logic and document manipulation, just as if it was not server-rendered at all.
The main feature of React.js that distinguishes it from other popular JavaScript frameworks is flexibility. You can grab a library and use it to display a simple page or a view, but you can also combine React.js with other tools and use it as a framework that will lay the foundation for a complex application.
The difference between React.js and React Native
React Native has recently become an even more popular buzzword in business circles. That is because Facebook actively promotes it as the best tool for cross-platform mobile app development. React Native uses UI elements written in React.js that can generate native iOS and Android interface components, such as buttons and animations. With React Native you can build applications that work smoothly on iPhone and Samsung or Huawei smartphones sharing the vast majority of the code between the two platforms.
Three key terms you need to know about React.js
There are not many of them, but understanding these basic expressions will help you get a grasp of what it’s about.
Components
These are the building blocks that can be put together to create an application. With React.js it’s relatively easy to build custom components, which is a very important feature since building custom components is needed in 99% cases and off-the-shelf components usually make up 10-20% of components in a React.js application. You may also go for an existing full-fledged UI library (like Material UI) and simply connect the components with data and custom logic.
JSX
It is an extension of JavaScript allowing developers to write views using syntax resembling HTML and XML which t can be mixed with JS to control the logic.
Redux
It is a state management library with a vibrant ecosystem, often paired with React.js.
What apps can you build in React.js?
For a start, think about Facebook.
It’s made with React.js. In 2012, Facebook Ads became challenging to manage as the social network’s web application was larger and included more components.
Mark Zuckerberg stated that relying on HTML5 was one of the biggest mistakes of their organization, promising at the same time to the users (and investors) that Facebook will deliver great mobile experiences soon.
At the same time, the corporation acquired Instagram. In May 2013, React.js was officially launched.
Since then React.js is taking over. New products are being made using it and some of the biggest and most successful digital products are incorporating React.js into their stack. This includes the world’s most renowned applications, such as:
- Social networks (Facebook, Instagram, Pinterest, Twitter)
- Sharing economy platforms (Airbnb, Lyft, Uber)
- Media sites (Yahoo!)
- Video platforms (Netflix)
- SaaS tools (SendGrid, Asana, InVisionApp, Zapier)
You can find the complete list of popular digital products using React.js here.
The Netguru team have also built plenty of great products using React.js – Newst, Moonfareand many more, including solutions for Solaris Bank, a Berlin-based fintech.
Facebook created React for their own purposes; most of their web and mobile apps are written using React. At the moment, the social network is in the process of rebuilding the whole platform with React, GraphQL, and Relay.