Why did Facebook engineers create React?

Photo by Lautaro Andreani on Unsplash

React isn’t an MVC framework.

React is a library for building composable user interfaces. It encourages the creation of reusable UI components which present data that changes over time.

React doesn’t use templates.

Traditionally, web application UIs are built using templates or HTML directives. These templates dictate the full set of abstractions that you are allowed to use to build your UI.

  • JavaScript is a flexible, powerful programming language with the ability to build abstractions. This is incredibly important in large applications.
  • By unifying your markup with its corresponding view logic, React can actually make views easier to extend and maintain.
  • By baking an understanding of markup and content into JavaScript, there’s no manual string concatenation and therefore less surface area for XSS vulnerabilities.

React updates are dead simple.

React really shines when your data changes over time.

HTML is just the beginning.

Because React has its own lightweight representation of the document, we can do some pretty cool things with it:

  • Facebook has dynamic charts that render to <canvas> instead of HTML.
  • Instagram is a “single page” web app built entirely with React and Backbone.Router. Designers regularly contribute React code with JSX.
  • We’ve built internal prototypes that run React apps in a web worker and use React to drive native iOS views via an Objective-C bridge.
  • You can run React on the server for SEO, performance, code sharing and overall flexibility.
  • Events behave in a consistent, standards-compliant way in all browsers (including IE8) and automatically use event delegation.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store