So what is React?
Let’s see why some of the biggest names use react
Interestingly, Facebook created ReactJS library, which is why it is obvious they would use it for the Facebook app. Facebook has recently opened a beta of its completely rewritten ReactJS, called React Fiber.
Instagram is completely based on the ReactJS library with its users completely adapting to its amazing features.The use of ReactJS within Instagram is huge with various features including the Google Maps APIs, geolocations, search engine accuracy as well as tags that pop out without hashtags.
The React version works with Netflix too – specifically on their platform called Gibbon which is used for low-performance TV devices instead of the DOM used in web browsers. There is also an official blog post by Netflix explaining how the ReactJS library helps their runtime performance, startup speed, modularity and various other advantages.
New York Times
A couple of months ago, New York Times has designed a great new project that simulates different looks of stars on Oscar red carpet. This project’s interface was built in React and allows the users to filter the gallery of different photos from 19 years in a fast and nice way. The re-rendering on this project is one of the impressive features of React
WhatsApp too uses ReactJS for building user interfaces, like the way it uses Underscore.js and Velocity.js as some of its most efficient engines. The newly launched WhatsApp Web app has also been using React.
Let’s look at what makes React this amazing
1. The Virtual DOM
Imagine a page has a button that changes the color of some text when clicked. It doesn’t make much sense to re-render the entire page for that. React plays smartly here and re-render only the text that changed color and leaves the rest of the page untouched. React keeps a virtual representation of an application’s page structure in memory while comparing it to any incoming changes. Anytime a render is required, React compares the incoming changes to the previous page and only updates the parts that were actually manipulated. This allows React to perform very efficiently and is its most impressive feature.
2. Reusable Components
React strongly encourages the use of components, a huge time-saver when it comes to development. A component could be anything a button, a navigation bar, a registration form, whatever an application needs. Once a component is built, it can be used over and over again throughout an app. Smaller components can be used together to create more complex components and different data can be passed into components to create unique instances. Not only does this save you time but it makes it easy to keep a consistent look and feel across your application.
4. Community Support
React is maintained by Facebook and Instagram but also has a great open-source community. There are a ton of React-specific solutions for any problem you may face. There are numerous component libraries that offer different buttons, modals, progress bars and more.
5. Learning Curve
Frameworks like Angular are much more complex and come pre-loaded with many other features. React is flexible in this regard and many times you’ll want to pair React with routing, state management, and other libraries to create a robust application. Even after adding additional packages to a project, React is still extremely intuitive to use.
React has its pitfalls as well, but the pros far outweigh the cons. The virtual DOM makes it extremely fast, component use cuts development time, JSX helps make coding with React feel more familiar, and it’s easy to pick up and get started with quickly.