Learn how React has been evolving in the past years and what are the most recent updates from the community.
This blog post was written under the Pusher Guest Writer program.
ReactJS started out as a library for XHP. XHP is Facebook’s version of PHP, which was open-sourced in 2010. The aim of creating XHP was to make frontend development easier and help avoid cross-site scripting attacks (XSS). XSS is a very common attack vector that inserts malicious code into a web application.
XSS does not attack the web application directly; instead, it attacks the users of that web application by attaching an embedded JavaScript code to the user’s request, which in turn steals information and compromises the integrity of the user trying to access a resource on that application.
This is where XHP comes in. XHP has an Automatic XSS protection; all page rendering is done inside XHP and it knows what Hypertext Markup Language (HTML) is and what a context is, hence escaping all contexts without any hassle.
However, XHP failed when it comes to building dynamic web applications. Meaning, once a change occurs, or a state changes, the web application re-renders itself, causing the user to lose any information previously stored in the Document Object Model (DOM). This got the Facebook Ads Org team thinking: why do we have to re-render the entire page just because a state changed? They realized early enough that this process was terrible for performance as well as user experience.
In 2011, Jordan Walke, a Software developer at Facebook, started working on a prototype to make this process more efficient while also providing a reasonable user experience. And this was how a JavaScript library for building user interfaces was conceived (React). A few months after, the ‘Like’ and commenting features on the Facebook site were built using React and Flux.
Around the same time that Facebook started using React on the like and commenting UI, and also on the Ads product (2012), they acquired Instagram. One of the first products Instagram wanted to build was their website. After taking a good look at Facebook’s stack, Pete Hunt made a case to use React on Instagram’s website. At the time, though, React was closely coupled to Facebook’s stack. Pete Hunt did not give up: he did most of the work required to decouple React from Facebook’s stack so that Instagram could use it as well, making Instagram the first external product to use React. With this, Facebook was a step away to blessing developers around the world with the awesomeness of React.
May 2013, React was open-sourced at JSConf in the United States. Since then, developers across the world actively use React in production. Companies like, Trello, Slack, Docker, Airbnb, Khan Academy, New York Times, Codecademy to mention a few actively use React.
In April 2015, Facebook released a patent regarding the usage of React which basically says, ‘In as much as you do not sue us for patent infringement, we will give you this software for free; you can sell, distribute, import, make, and use this product. In addition, we also promise not to sue you for any patent infringement as regards this open source software.’ You can read about it here.
Text, View, Image, StyleSheet, Touchable, Animated, and Platform
). With React-Primitives, you can now render your exact code base on web, native applications, ReactVR and Sketch.“React 16″ will be the first major publicly available release that uses the React Fiber Implementation.
A quick search of tech trends on Stack Overflow, shows a steady increase in the growth of React from 2014 – 2017. In essence, developers around the world actively seek and get answers to questions asked about React. Looking at a list of contributors on the react core repository , it shows a massive developer ecosystem around React.
React is such a good idea that we will spend the rest of the decade continuing to explore its implications and applications – Guillermo Rauch.
Interested in React? Visit here to get started.
Thanks for reading!